|
- class Device {
- int? id;
- String? name;
- String? status;
- String? location;
- num? mode;
- bool? isSelected;
-
- Device({this.id, this.name, this.status, this.location, this.mode});
-
- Device.clone(Device device) {
- this.id = device.id;
- this.name = device.name;
- this.status = device.status;
- this.location = device.location;
- this.mode = device.mode;
- }
-
- Device.fromJson(Map<String, dynamic> json) {
- id = json['id'];
- name = json['name'];
- status = json['status'];
- location = json['location'];
- mode = json['mode'];
- isSelected = false;
- }
-
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['id'] = this.id;
- data['name'] = this.name;
- data['status'] = this.status;
- data['location'] = this.location;
- data['mode'] = this.mode;
- return data;
- }
- }
|