mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-08-26 04:09:40 +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) {
|
||||
if (json['name'] != null && json['type'] != null) {
|
||||
return Action(
|
||||
actionExecutor: json["actionExecutor"] ?? '',
|
||||
entityId: json["entityId"] ?? '',
|
||||
actionExecutor: json["actionExecutor"] as String,
|
||||
entityId: json["entityId"] as String,
|
||||
name: json['name'] as String?,
|
||||
type: json['type'] as String?,
|
||||
productType: json['productType'] as String?,
|
||||
@ -102,8 +102,8 @@ class Action {
|
||||
}
|
||||
|
||||
return Action(
|
||||
actionExecutor: json["actionExecutor"] ?? '',
|
||||
entityId: json["entityId"] ?? '',
|
||||
actionExecutor: json["actionExecutor"] as String,
|
||||
entityId: json["entityId"] as String,
|
||||
executorProperty: ExecutorProperty.fromJson(json["executorProperty"]),
|
||||
productType: json['productType'] as String?,
|
||||
);
|
||||
|
Reference in New Issue
Block a user