fromName static method
Returns the PermissionType associated with the given name
.
Returns null
if no match is found.
Implementation
static PermissionType fromName(String? name,
{PermissionType? defaultPermission}) {
return values.firstWhere((element) => element.name == name,
orElse: defaultPermission == null ? null : () => defaultPermission);
}