fix: handle nullable uuid in GatewayModel.fromJson

This commit is contained in:
Faris Armoush
2025-04-09 12:33:20 +03:00
parent 694a5a7dda
commit 387ef99728

View File

@ -39,7 +39,7 @@ class GatewayModel {
} }
return GatewayModel( return GatewayModel(
uuid: json['uuid'] as String, uuid: json['uuid'] as String? ?? '',
switchAlarmSound: switchAlarmSound ?? false, switchAlarmSound: switchAlarmSound ?? false,
masterState: masterState ?? '', masterState: masterState ?? '',
factoryReset: factoryReset ?? false, factoryReset: factoryReset ?? false,