Files
syncrow-app/lib/features/devices/model/device_control_model.dart
Mohammad Salameh fbe2f5fe53 !! BIG CHANGE TO ASSETS GEN !!
changed the method of generating assets to be more declrative when it comes to names of the assets.

it now include the file path name e.g (asset in the path "assets/images/home-images/home.png" will be generated as this "String assetsImagesHomeImageshome = "path" ".

this will be very helpful in the future when we want to orgnize the assets dir.
2024-05-07 12:26:12 +03:00

28 lines
520 B
Dart

class DeviceControlModel {
String? deviceId;
String? code;
dynamic value;
DeviceControlModel({
required this.deviceId,
required this.code,
required this.value,
});
factory DeviceControlModel.fromJson(Map<String, dynamic> json) {
return DeviceControlModel(
deviceId: json['deviceUuid'],
code: json['code'],
value: json['value'],
);
}
Map<String, dynamic> toJson() {
return {
'deviceUuid': deviceId,
'code': code,
'value': value,
};
}
}