DeviceUser.fromJson constructor
DeviceUser.fromJson(
- Map<String, dynamic> map
)
Implementation
factory DeviceUser.fromJson(Map<String, dynamic> map) {
return DeviceUser(
deviceName: map["deviceName"],
userUuid: map["userUuid"],
freeze: map["freeze"],
authType: map["authType"],
startDate: map["startDate"],
endDate: map["endDate"],
grade: map["grade"],
sender: map["sender"],
sort: map["sort"],
device: Device(
mac: map["device"]["mac"],
years: map["device"]["years"],
model: map["device"]["model"],
softwareCode: map["device"]["softwareCode"],
battery: map["device"]["battery"],
deviceId: map["device"]["deviceId"],
volume: map["device"]["volume"],
deviceName: map["device"]["deviceName"],
statusCode: map["device"]["statusCode"],
rssi: map["device"]["rssi"],
version: map["device"]["version"],
createdTime: map["device"]["createdTime"],
onLine: map["device"]["onLine"],
deviceKey: map["device"]["deviceKey"],
),
);
}