mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
built 3 gang switch View
This commit is contained in:
27
lib/features/devices/model/device_control_model.dart
Normal file
27
lib/features/devices/model/device_control_model.dart
Normal file
@ -0,0 +1,27 @@
|
||||
class DeviceControlModel {
|
||||
String? deviceId;
|
||||
String? code;
|
||||
bool? value;
|
||||
|
||||
DeviceControlModel({
|
||||
required this.deviceId,
|
||||
required this.code,
|
||||
required this.value,
|
||||
});
|
||||
|
||||
factory DeviceControlModel.fromJson(Map<String, dynamic> json) {
|
||||
return DeviceControlModel(
|
||||
deviceId: json['deviceId'],
|
||||
code: json['code'],
|
||||
value: json['value'],
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'deviceId': deviceId,
|
||||
'code': code,
|
||||
'value': value,
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user