mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 02:37:55 +00:00
commit last changes
This commit is contained in:
@@ -183,9 +183,9 @@ class CreateSceneExecutorProperty {
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'functionCode': functionCode,
|
||||
'functionValue': functionValue,
|
||||
'delaySeconds': delaySeconds,
|
||||
if (functionCode.isNotEmpty == true) 'functionCode': functionCode,
|
||||
if (functionValue != '') 'functionValue': functionValue,
|
||||
if (delaySeconds > 0) 'delaySeconds': delaySeconds,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ class ExecutorProperty {
|
||||
factory ExecutorProperty.fromJson(Map<String, dynamic> json) =>
|
||||
ExecutorProperty(
|
||||
functionCode: json["functionCode"] ?? '',
|
||||
functionValue: json["functionValue"],
|
||||
delaySeconds: json["delaySeconds"],
|
||||
functionValue: json["functionValue"] ?? '',
|
||||
delaySeconds: json["delaySeconds"] ?? 0,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
|
||||
Reference in New Issue
Block a user