toUserRole method
Implementation
UserRole toUserRole() {
switch (this) {
case 'USER':
return UserRole.user;
case 'RESOURCE':
return UserRole.resource;
case 'SYSTEM_USER':
return UserRole.systemUser;
}
throw Exception('$this is not known in enum UserRole');
}