adding the delay

This commit is contained in:
ashrafzarkanisala
2024-07-01 05:23:27 +03:00
parent 32b992e276
commit f285afcbe6
5 changed files with 85 additions and 12 deletions
@@ -68,27 +68,26 @@ class Action {
}
class ExecutorProperty {
final String functionCode;
final String? functionCode;
final dynamic functionValue;
final dynamic delaySeconds;
ExecutorProperty({
required this.functionCode,
required this.functionValue,
this.functionCode,
this.functionValue,
this.delaySeconds,
});
factory ExecutorProperty.fromRawJson(String str) =>
ExecutorProperty.fromJson(json.decode(str));
String toRawJson() => json.encode(toJson());
factory ExecutorProperty.fromJson(Map<String, dynamic> json) =>
ExecutorProperty(
functionCode: json["functionCode"],
functionCode: json["functionCode"] ?? '',
functionValue: json["functionValue"],
delaySeconds: json["delaySeconds"],
);
Map<String, dynamic> toJson() => {
"functionCode": functionCode,
"functionValue": functionValue,
"delaySeconds": delaySeconds,
};
}