From 73d28a1800e7e91ab24fa084735d1e6688fcb631 Mon Sep 17 00:00:00 2001 From: mohammad Date: Thu, 17 Apr 2025 10:41:01 +0300 Subject: [PATCH] Refactor Action class to use type annotations for actionExecutor and entityId --- lib/features/scene/model/scene_details_model.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/features/scene/model/scene_details_model.dart b/lib/features/scene/model/scene_details_model.dart index 51024d7..5d392fb 100644 --- a/lib/features/scene/model/scene_details_model.dart +++ b/lib/features/scene/model/scene_details_model.dart @@ -90,8 +90,8 @@ class Action { static Action? fromJson(Map 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?, );