set default values in the devices models instead of late, and fixed issues in the AC bloc

This commit is contained in:
Abdullah Alassaf
2025-02-20 04:13:37 +03:00
parent 3f7f7ce49f
commit 450b773921
14 changed files with 106 additions and 148 deletions

View File

@ -10,8 +10,8 @@ class SosModel {
});
factory SosModel.fromJson(List<StatusModel> jsonList) {
late String _sosContactState;
late int _batteryPercentage;
String _sosContactState = '';
int _batteryPercentage = 0;
for (int i = 0; i < jsonList.length; i++) {
if (jsonList[i].code == 'sos') {