fromValue static method
Returns the PermissionType associated with the given value
.
Throws an error if no match is found.
Implementation
static PermissionType fromValue(int? value,
{PermissionType? defaultPermission}) {
return values.firstWhere((element) => element.value == value,
orElse: defaultPermission == null ? null : () => defaultPermission);
}