push dialog changes in values

This commit is contained in:
ashrafzarkanisala
2024-07-28 05:04:57 +03:00
parent 0bda828161
commit 50b455b4ae
18 changed files with 645 additions and 33 deletions
@@ -81,7 +81,7 @@ class CreateSceneModel {
class CreateSceneAction {
String entityId;
String actionExecutor;
CreateSceneExecutorProperty executorProperty;
CreateSceneExecutorProperty? executorProperty;
CreateSceneAction({
required this.entityId,
@@ -105,7 +105,8 @@ class CreateSceneAction {
return {
'entityId': entityId,
'actionExecutor': actionExecutor,
'executorProperty': executorProperty.toMap(actionExecutor),
if (executorProperty != null)
'executorProperty': executorProperty?.toMap(actionExecutor),
};
}
@@ -0,0 +1,23 @@
class SmartSceneEnable {
final String entityId;
final String actionExecutor;
SmartSceneEnable({
required this.entityId,
required this.actionExecutor,
});
factory SmartSceneEnable.fromJson(Map<String, dynamic> json) {
return SmartSceneEnable(
entityId: json['entityId'],
actionExecutor: json['actionExecutor'],
);
}
Map<String, dynamic> toJson() {
return {
'entityId': entityId,
'actionExecutor': actionExecutor,
};
}
}