mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 01:56:19 +00:00
Refactor device status handling and update UI components
- Update device status handling from 'status' to 'isOnline' for consistency - Remove unused imports and redundant code related to light switches - Refactor UI components to use 'isOnline' instead of 'status' for device status
This commit is contained in:
@ -1,21 +1,10 @@
|
||||
//{
|
||||
// "code": "switch_1",
|
||||
// "desc": "switch 1",
|
||||
// "name": "switch 1",
|
||||
// "type": "Boolean",
|
||||
// "values": "{}"
|
||||
// }
|
||||
class FunctionModel {
|
||||
String? code;
|
||||
String? desc;
|
||||
String? name;
|
||||
String? type;
|
||||
String? values;
|
||||
|
||||
FunctionModel({
|
||||
required this.code,
|
||||
required this.desc,
|
||||
required this.name,
|
||||
required this.type,
|
||||
required this.values,
|
||||
});
|
||||
@ -23,8 +12,6 @@ class FunctionModel {
|
||||
factory FunctionModel.fromJson(Map<String, dynamic> json) {
|
||||
return FunctionModel(
|
||||
code: json['code'],
|
||||
desc: json['desc'],
|
||||
name: json['name'],
|
||||
type: json['type'],
|
||||
values: json['values'],
|
||||
);
|
||||
@ -33,8 +20,6 @@ class FunctionModel {
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'code': code,
|
||||
'desc': desc,
|
||||
'name': name,
|
||||
'type': type,
|
||||
'values': values,
|
||||
};
|
||||
|
Reference in New Issue
Block a user