fromValue static method

MIRPot fromValue(
  1. int? value
)

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}),
  );
}