toDeviceStatus method
Implementation
DeviceStatus toDeviceStatus() {
switch (this) {
case 'READY':
return DeviceStatus.ready;
case 'PENDING':
return DeviceStatus.pending;
case 'WAS_OFFLINE':
return DeviceStatus.wasOffline;
case 'DEREGISTERED':
return DeviceStatus.deregistered;
case 'FAILED':
return DeviceStatus.failed;
}
throw Exception('$this is not known in enum DeviceStatus');
}