mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-08-26 07:19:39 +00:00
Refactor Action class to use type annotations for actionExecutor and entityId
This commit is contained in:
@ -90,8 +90,8 @@ class Action {
|
|||||||
static Action? fromJson(Map<String, dynamic> json) {
|
static Action? fromJson(Map<String, dynamic> json) {
|
||||||
if (json['name'] != null && json['type'] != null) {
|
if (json['name'] != null && json['type'] != null) {
|
||||||
return Action(
|
return Action(
|
||||||
actionExecutor: json["actionExecutor"] ?? '',
|
actionExecutor: json["actionExecutor"] as String,
|
||||||
entityId: json["entityId"] ?? '',
|
entityId: json["entityId"] as String,
|
||||||
name: json['name'] as String?,
|
name: json['name'] as String?,
|
||||||
type: json['type'] as String?,
|
type: json['type'] as String?,
|
||||||
productType: json['productType'] as String?,
|
productType: json['productType'] as String?,
|
||||||
@ -102,8 +102,8 @@ class Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Action(
|
return Action(
|
||||||
actionExecutor: json["actionExecutor"] ?? '',
|
actionExecutor: json["actionExecutor"] as String,
|
||||||
entityId: json["entityId"] ?? '',
|
entityId: json["entityId"] as String,
|
||||||
executorProperty: ExecutorProperty.fromJson(json["executorProperty"]),
|
executorProperty: ExecutorProperty.fromJson(json["executorProperty"]),
|
||||||
productType: json['productType'] as String?,
|
productType: json['productType'] as String?,
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user