Files
syncrow-app/lib/features/devices/model/device_control_model.dart
Mohammad Salameh 6577652702 Refactor AC mode control unit widget
Move fan speed and temperature mode logic to the DevicesCubit for better
separation of concerns and improved code readability. Update widget to use
BlocBuilder for state management and simplify control logic.
2024-04-03 18:53:54 +03:00

28 lines
516 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['deviceId'],
code: json['code'],
value: json['value'],
);
}
Map<String, dynamic> toJson() {
return {
'deviceId': deviceId,
'code': code,
'value': value,
};
}
}