fromValue static method
Creates an AuthorityType instance from the provided value.
Throws a MessageException
if no AuthorityType is found for the given value.
Implementation
static AuthorityType fromValue(int? value) {
try {
return values.firstWhere((element) => element.value == value);
} on StateError {
throw MessageException("No AuthorityType found for the given value.",
details: {"value": value});
}
}