fromValue static method

RelayType fromValue(
  1. int? value
)

Get the RelayType instance corresponding to a given value.

Implementation

static RelayType fromValue(int? value) {
  return values.firstWhere(
    (element) => element.value == value,
    orElse: () => throw MessageException(
        "No RelayType found matching the specified value",
        details: {"value": value}),
  );
}