valueOf static method

Scope valueOf(
  1. String value
)

Returns the scope associated with the given value.

Implementation

static Scope valueOf(final String value) {
  for (final scope in values) {
    if (scope.value == value) {
      return scope;
    }
  }

  throw ArgumentError('Invalid scope value: $value');
}