toDiskState method
Implementation
DiskState toDiskState() {
switch (this) {
case 'pending':
return DiskState.pending;
case 'error':
return DiskState.error;
case 'available':
return DiskState.available;
case 'in-use':
return DiskState.inUse;
case 'unknown':
return DiskState.unknown;
}
throw Exception('$this is not known in enum DiskState');
}