ScopeDesign class
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
- Mixed-in types
Constructors
- ScopeDesign({required String type, required bool isSingleton, required bool isPrototype})
-
Creates a ScopeDesign with the given
type,isSingleton, andisPrototypeflags. - ScopeDesign.type(String type)
-
Creates a ScopeDesign with the given
typeflag.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPrototype ↔ bool
-
Whether the scope is prototype.
getter/setter pair
- isSingleton ↔ bool
-
Whether the scope is singleton.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type ↔ String
-
The ScopeType of this descriptor.
See Defines the lifecycle scope of a component within a dependency injection container.getter/setter pair
Methods
-
equalizedProperties(
) → List< Object?> -
Mixin-style contract for value-based equality,
hashCode, andtoString.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toStringOptions(
) → ToStringOptions -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited