toDeviceAvailability method
Implementation
DeviceAvailability toDeviceAvailability() {
switch (this) {
case 'TEMPORARY_NOT_AVAILABLE':
return DeviceAvailability.temporaryNotAvailable;
case 'BUSY':
return DeviceAvailability.busy;
case 'AVAILABLE':
return DeviceAvailability.available;
case 'HIGHLY_AVAILABLE':
return DeviceAvailability.highlyAvailable;
}
throw Exception('$this is not known in enum DeviceAvailability');
}