add structure

This commit is contained in:
2020-05-29 07:45:27 +06:30
parent 4c851d9971
commit bad27ba5c4
272 changed files with 36065 additions and 174 deletions

24
lib/vo/device.dart Normal file
View File

@@ -0,0 +1,24 @@
class PhoneDevice {
String id;
String name;
bool deviceOn;
bool primaryDevice;
PhoneDevice({this.id, this.name, this.deviceOn, this.primaryDevice});
factory PhoneDevice.fromMap(Map<String, dynamic> map, String id) {
return PhoneDevice(
id: id,
name: map['name'],
deviceOn: map['device_on'],
primaryDevice: map['primary_device']);
}
bool isDeviceOn() {
return this.deviceOn == true;
}
@override
String toString() {
return 'PhoneDevice{id:$id, name:$name,deviceOn:$deviceOn,primaryDevice:$primaryDevice}';
}
}