fromValue static method
Retrieves a MIRPot object based on its value.
Implementation
static MIRPot fromValue(int? value) {
return values.firstWhere(
(element) => element.value == value,
orElse: () => throw MessageException(
"No MIRPot found matching the specified value",
details: {"value": value}),
);
}