fromName static method

RelayType fromName(
  1. String? name
)

Get the RelayType instance corresponding to a given name.

Implementation

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