From 387ef99728382cf082f5f4a96859b15f420f9c98 Mon Sep 17 00:00:00 2001 From: Faris Armoush Date: Wed, 9 Apr 2025 12:33:20 +0300 Subject: [PATCH] fix: handle nullable uuid in GatewayModel.fromJson --- lib/pages/device_managment/gateway/model/gateway_model.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/device_managment/gateway/model/gateway_model.dart b/lib/pages/device_managment/gateway/model/gateway_model.dart index b9600fd7..a522aa00 100644 --- a/lib/pages/device_managment/gateway/model/gateway_model.dart +++ b/lib/pages/device_managment/gateway/model/gateway_model.dart @@ -39,7 +39,7 @@ class GatewayModel { } return GatewayModel( - uuid: json['uuid'] as String, + uuid: json['uuid'] as String? ?? '', switchAlarmSound: switchAlarmSound ?? false, masterState: masterState ?? '', factoryReset: factoryReset ?? false,