Scope<T> class abstract

Defines a scope that holds dependencies tied to a specific lifecycle.

For example, some dependencies may only need to exist after authentication and should be disposed of when the user logs out. This would be defined as an "auth" scope.

Weaver can enter or leave scopes. When entering a scope, if a corresponding ScopeHandler is registered, it will be notified to register the dependencies.

Constructors

Scope({required String name, required T args})
Creates a Scope with a unique name and optional args.

Properties

args → T
The arguments passed to the scope when entering it.
final
hashCode int
The hash code for this object.
no setterinherited
name String
The unique name identifying this scope.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited