push batch door sensor, design bugs

This commit is contained in:
ashrafzarkanisala
2024-10-02 01:41:15 +03:00
parent 0d49ad5106
commit 9dbf4b0540
16 changed files with 195 additions and 60 deletions

View File

@ -63,6 +63,7 @@ class AllDevicesModel {
int? updateTime;
String? uuid;
int? batteryLevel;
String? productName;
AllDevicesModel({
this.room,
@ -90,6 +91,7 @@ class AllDevicesModel {
this.updateTime,
this.uuid,
this.batteryLevel,
this.productName,
});
AllDevicesModel.fromJson(Map<String, dynamic> json) {
room = (json['room'] != null && (json['room'] is Map))
@ -121,6 +123,7 @@ class AllDevicesModel {
updateTime = int.tryParse(json['updateTime']?.toString() ?? '');
uuid = json['uuid']?.toString();
batteryLevel = int.tryParse(json['battery']?.toString() ?? '');
productName = json['productName']?.toString();
}
String _getDefaultIcon(String? productType) {
@ -182,6 +185,7 @@ class AllDevicesModel {
data['updateTime'] = updateTime;
data['uuid'] = uuid;
data['battery'] = batteryLevel;
data['productName'] = productName;
return data;
}
@ -214,6 +218,7 @@ class AllDevicesModel {
other.timeZone == timeZone &&
other.updateTime == updateTime &&
other.uuid == uuid &&
other.productName == productName &&
other.batteryLevel == batteryLevel;
}
@ -243,6 +248,7 @@ class AllDevicesModel {
timeZone.hashCode ^
updateTime.hashCode ^
uuid.hashCode ^
productName.hashCode ^
batteryLevel.hashCode;
}
}