fromName static method

ScriptRefType fromName(
  1. String? name
)

Gets the ScriptRefType instance corresponding to the provided name.

Implementation

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