mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-08-26 04:39:39 +00:00
Fixed show in device bug
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:ffi';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
@ -10,7 +9,6 @@ class CreateSceneModel {
|
||||
String sceneName;
|
||||
String decisionExpr;
|
||||
List<CreateSceneAction> actions;
|
||||
bool showInHomePage;
|
||||
|
||||
CreateSceneModel({
|
||||
required this.spaceUuid,
|
||||
@ -19,7 +17,6 @@ class CreateSceneModel {
|
||||
required this.sceneName,
|
||||
required this.decisionExpr,
|
||||
required this.actions,
|
||||
this.showInHomePage = false,
|
||||
});
|
||||
|
||||
CreateSceneModel copyWith({
|
||||
@ -38,7 +35,6 @@ class CreateSceneModel {
|
||||
sceneName: sceneName ?? this.sceneName,
|
||||
decisionExpr: decisionExpr ?? this.decisionExpr,
|
||||
actions: actions ?? this.actions,
|
||||
showInHomePage: showInHomePage ?? this.showInHomePage,
|
||||
);
|
||||
}
|
||||
|
||||
@ -50,16 +46,14 @@ class CreateSceneModel {
|
||||
'sceneName': sceneName,
|
||||
'decisionExpr': decisionExpr,
|
||||
'actions': actions.map((x) => x.toMap()).toList(),
|
||||
'showInHomePage': showInHomePage,
|
||||
};
|
||||
}
|
||||
|
||||
factory CreateSceneModel.fromMap(Map<String, dynamic> map) {
|
||||
return CreateSceneModel(
|
||||
spaceUuid: map['spaceUuid'] ?? '',
|
||||
showInHomePage: map['showInHomePage'] ?? false,
|
||||
iconId: map['iconUuid'] ?? '',
|
||||
showInDevice: map['showInHomePage'] ?? false,
|
||||
iconId: map['iconUuid'] ?? '',
|
||||
sceneName: map['sceneName'] ?? '',
|
||||
decisionExpr: map['decisionExpr'] ?? '',
|
||||
actions: List<CreateSceneAction>.from(
|
||||
@ -87,8 +81,7 @@ class CreateSceneModel {
|
||||
other.showInDevice == showInDevice &&
|
||||
other.sceneName == sceneName &&
|
||||
other.decisionExpr == decisionExpr &&
|
||||
listEquals(other.actions, actions) &&
|
||||
other.showInHomePage == showInHomePage;
|
||||
listEquals(other.actions, actions);
|
||||
}
|
||||
|
||||
@override
|
||||
|
Reference in New Issue
Block a user