mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-17 02:25:16 +00:00

Added a new StatusModel class to represent device statuses and implemented functionality to fetch and update device statuses in the DevicesCubit and DeviceModel classes. Also updated UI components to display device status information.
24 lines
378 B
Dart
24 lines
378 B
Dart
class StatusModel {
|
|
String? code;
|
|
dynamic value;
|
|
|
|
StatusModel({
|
|
required this.code,
|
|
required this.value,
|
|
});
|
|
|
|
factory StatusModel.fromJson(Map<String, dynamic> json) {
|
|
return StatusModel(
|
|
code: json['code'],
|
|
value: json['value'],
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'code': code,
|
|
'value': value,
|
|
};
|
|
}
|
|
}
|