DeviceStatusInfo.fromJson constructor
DeviceStatusInfo.fromJson(
- Map<String, dynamic> json
)
Implementation
factory DeviceStatusInfo.fromJson(Map<String, dynamic> json) {
return DeviceStatusInfo(
connectionStatus:
(json['ConnectionStatus'] as String?)?.toConnectionStatus(),
connectionStatusUpdatedTime:
timeStampFromJson(json['ConnectionStatusUpdatedTime']),
deviceStatusDetails: (json['DeviceStatusDetails'] as List?)
?.whereNotNull()
.map((e) => DeviceStatusDetail.fromJson(e as Map<String, dynamic>))
.toList(),
);
}