toKeyState method
Implementation
KeyState toKeyState() {
switch (this) {
case 'Enabled':
return KeyState.enabled;
case 'Disabled':
return KeyState.disabled;
case 'PendingDeletion':
return KeyState.pendingDeletion;
case 'PendingImport':
return KeyState.pendingImport;
case 'Unavailable':
return KeyState.unavailable;
}
throw Exception('$this is not known in enum KeyState');
}