Scope class abstract
Scope
is the range that something within it can be accessed.
- Implemented types
- Implementers
- Available Extensions
Constructors
- Scope()
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
-
dispose(
) → void -
As opposite to
scope.push
, scope can also be disposed/popped. We can register dispose logic, that will run when scope been disposed:override -
getOrNull<
T> ({Object? name}) → T? -
Use
scope.getOrNull<T>(...)
to safely resolve instance. This method will returnnull
when instance is not exposed:inherited -
has<
T> ({Object? name}) → bool -
Use
scope.has<T>(...)
to check if instance has been exposed:inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
push(
List< Configurable> configure) → FutureOr<Scope> -
Use
scope.push(...)
to create a new child scope. Child scope inherited getters from parent:inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
root(
List< Configurable> configure) → FutureOr<Scope> -
Use
Scope.root(...)
to create a top level scope with configurations: