mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-15 17:47:53 +00:00
push design and missing view and folder structure
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
|
||||
class ScenesModel {
|
||||
final String id;
|
||||
final String name;
|
||||
@ -13,12 +15,16 @@ class ScenesModel {
|
||||
this.icon,
|
||||
});
|
||||
|
||||
factory ScenesModel.fromJson(Map<String, dynamic> json) => ScenesModel(
|
||||
factory ScenesModel.fromJson(Map<String, dynamic> json,
|
||||
{bool? isAutomation}) =>
|
||||
ScenesModel(
|
||||
id: json["id"],
|
||||
name: json["name"] ?? '',
|
||||
status: json["status"] ?? '',
|
||||
type: json["type"] ?? '',
|
||||
icon: json["icon"] as String?,
|
||||
icon: (isAutomation ?? false)
|
||||
? Assets.automation
|
||||
: json["icon"] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
|
Reference in New Issue
Block a user