# fromValue static method

ScopeType fromValue(

1. int value

)

Returns the ScopeType that corresponds to the given integer `value`.

    final scope = ScopeType.fromValue(1);
    print(scope == ScopeType.PROTOTYPE); // true

Throws an IllegalArgumentException if the value does not map to any scope.

## Implementation

    static ScopeType fromValue(int value) {
      return switch (value) {
        0 => SINGLETON,
        1 => PROTOTYPE,
        _ => throw IllegalArgumentException('No ScopeType with value $value')
      };
    }