# ScopeDesign.type constructor

ScopeDesign.type(

1. String type

)

Creates a ScopeDesign with the given `type` flag.

Describes the scope configuration of a component.

A scope determines the lifecycle behavior of the component. See {@macro scope_type}.

### Example

    final scope = ScopeDesign(
      type: ScopeType.SINGLETON,
      isSingleton: true,
      isPrototype: false,
    );

    print(scope.type); // ScopeType.SINGLETON
    print(scope.isSingleton); // true

## Implementation

    ScopeDesign.type(this.type) : isPrototype = type.equalsIgnoreCase(ScopeType.PROTOTYPE.name), isSingleton = type.equalsIgnoreCase(ScopeType.SINGLETON.name);