ScopeBuilder class
Allows you to define the providers for a scope to be created once it is needed in.
Think of the difference between ScopeBuilder and Scope as you can use Scope to retrieve the dependencies, and you can use ScopeBuilder to define how they are created.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
factory<
T> (T provider(Scope scope), {dynamic qualifier}) → dynamic - Adds a provider that is run every time the dependency is requested.
-
intoMap<
K, V> (Map< K, V> provider(Scope scope), {dynamic qualifier}) → dynamic -
Appends a provider to the map multibinding of
T
. -
intoSet<
T> (Set< T> provider(Scope scope), {dynamic qualifier}) → dynamic -
Appends a provider to the set multibinding of
T
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scope<
T> (dynamic scopeFactory(ScopeBuilder builder)) → dynamic -
Lends you another ScopeBuilder where you can define the dependencies'
providers valid in a scope of a
T
. -
scoped<
T> (T provider(Scope scope), {dynamic qualifier}) → dynamic - Adds a provider that is run once per scope instance, when the dependency is requested the first time.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited