|
- class Device {
- int id;
- String name;
- String status;
- String location;
-
- Device({this.id, this.name, this.status, this.location});
-
- Device.clone(Device device) {
- this.id = device.id;
- this.name = device.name;
- this.status = device.status;
- this.location = device.location;
- }
-
- Device.fromJson(Map<String, dynamic> json) {
- id = json['id'];
- name = json['name'];
- status = json['status'];
- location = json['location'];
- }
-
- 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;
- return data;
- }
- }
|