mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 06:24:55 +00:00
@ -42,27 +42,27 @@ class ScenesModel {
|
||||
factory ScenesModel.fromJson(Map<String, dynamic> json,
|
||||
{bool? isAutomation}) {
|
||||
return ScenesModel(
|
||||
id: json['id'] ?? json['uuid'] ?? '',
|
||||
sceneTuyaId: json['sceneTuyaId'] as String?,
|
||||
name: json['name'] ?? '',
|
||||
status: json['status'] ?? '',
|
||||
type: json['type'] ?? '',
|
||||
spaceName: json['spaceName'] ?? '',
|
||||
spaceId: json['spaceId'] ?? '',
|
||||
communityId: json['communityId'] ?? '',
|
||||
id: json["id"] ?? json["uuid"] ?? '',
|
||||
sceneTuyaId: json["sceneTuyaId"] as String?,
|
||||
name: json["name"] ?? '',
|
||||
status: json["status"] ?? '',
|
||||
type: json["type"] ?? '',
|
||||
spaceName: json["spaceName"] ?? '',
|
||||
spaceId: json["spaceId"] ?? '',
|
||||
communityId: json["communityId"] ?? '',
|
||||
icon:
|
||||
isAutomation == true ? Assets.automation : (json['icon'] as String?),
|
||||
isAutomation == true ? Assets.automation : (json["icon"] as String?),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'sceneTuyaId': sceneTuyaId ?? '',
|
||||
'name': name,
|
||||
'status': status,
|
||||
'type': type,
|
||||
'spaceName': spaceName,
|
||||
'spaceId': spaceId,
|
||||
'communityId': communityId,
|
||||
"id": id,
|
||||
"sceneTuyaId": sceneTuyaId ?? '',
|
||||
"name": name,
|
||||
"status": status,
|
||||
"type": type,
|
||||
"spaceName": spaceName,
|
||||
"spaceId": spaceId,
|
||||
"communityId": communityId,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user