mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
push batch door sensor, design bugs
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user