Scope class abstract
Scope, dependency injector/provider/scope
A generic implementation of an InheritedWidget.
Any descendant of this widget can obtain value
using Scope.of.
Properties
- builder → TransitionBuilder?
-
A builder that builds a widget given a child.
no setterinherited
- child → Widget?
-
Child widget.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shouldNotify
→ UpdateShouldNotify<
Object> ? -
Whether the framework should notify widgets that inherit from this widget.
no setterinherited
Methods
-
copyWith(
{Widget? newChild, UpdateShouldNotify< Object> ? newShouldNotify, TransitionBuilder? newBuilder, Key? newKey}) → IScope<Object> -
Copy with new fields
inherited
-
createElement(
) → Element -
Inflates this configuration to a concrete instance.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create<
T extends Object> ({required Create< T> create, Update<T> ? update, Dispose<T> ? dispose, TransitionBuilder? builder, Widget? child, UpdateShouldNotify<T> ? shouldNotify, Key? key}) → IScope<T> - Creates a value, then expose it to its descendants.
-
maybeOf<
T extends Object> (BuildContext context, {bool listen = false}) → T? - Obtains the nearest Scope
-
multi(
{required List< IScope< scopes, Widget? child, TransitionBuilder? builder, Key? key}) → MultiScopeObject> > - TODO: doc
-
of<
T extends Object> (BuildContext context, {bool listen = false}) → T - Obtains the nearest Scope
-
value<
T extends Object> ({required T value, TransitionBuilder? builder, Widget? child, UpdateShouldNotify< T> ? shouldNotify, Key? key}) → IScope<T> - Expose to its descendants an existing value,