GlobalScope class
Experimental. Use with caution as the api is likely to change. This is intended as a replacement for Get It but with a consistent api to Scope as well as being sensitive to ScopeKeys in Scope. Values injected into a GlobalScope by injecting the same key into a Scope.
Constructors
- GlobalScope()
-
Get the GlobalScope singleon
factory
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
-
hasScopeKey<
T> (ScopeKey< T> key) → bool -
Returns true if
key
is contained within the GlobalScope. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sequence<
T> (ScopeKey< T> key, T factory()) → void -
single<
T> (ScopeKey< T> key, T factory()) → void - In the GlobalScope the single method is no different to the value method as the GlobalScope doesn't have a run method. It does however have access to any ScopeKeys that you have already addes to the GlobalScope any other scope that is active when the single method is called.
-
toString(
) → String -
A string representation of this object.
inherited
-
use<
T> (ScopeKey< T> key, {T withDefault()?}) → T -
Returns the value provided for
key
, or the keys default value if no value was provided. -
value<
T> (ScopeKey< T> key, T value) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited