AsyncDataScopeBase<W extends AsyncDataScopeBase<W, T>, T extends Object?> class abstract base AsyncDataScope

Inheritance
Implementers

Constructors

AsyncDataScopeBase({Key? key, Object? tag, Object? scopeKey, Duration? scopeKeyTimeout, void onScopeKeyTimeout()?, Duration? initCancellationTimeout, void onInitCancellationTimeout()?, Duration? disposeScopeTimeout, void onDisposeScopeTimeout()?, Duration? waitForChildrenTimeout, void onWaitForChildrenTimeout()?, Duration? pauseAfterInitialization, Widget child = const _NullWidget()})
Creates an asynchronous scope producing a value.
const

Properties

child → Widget
The widget below this widget in the tree.
finalinherited
disposeScopeTimeout → Duration?
How long to wait for the asynchronous teardown; null takes the default.
final
hashCode → int
The hash code for this object.
no setterinherited
initCancellationTimeout → Duration?
How long the teardown waits for the initialization to be cancelled; null takes the default.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onDisposeScopeTimeout → void Function()?
Called when the wait for the asynchronous teardown expires.
final
onInitCancellationTimeout → void Function()?
Called when the wait for the cancellation expires.
final
onScopeKeyTimeout → void Function()?
Called when the wait for scopeKey expires.
final
onWaitForChildrenTimeout → void Function()?
Called when the wait for the child scopes expires.
final
pauseAfterInitialization → Duration?
Holds the ready branch back for this long after the initialization.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scopeKey → Object?
Serializes this scope with the others that share the key.
final
scopeKeyTimeout → Duration?
How long to wait for scopeKey; null takes the default.
final
tag → Object?
Names this particular scope in the log.
finalinherited
waitForChildrenTimeout → Duration?
How long to wait for the child scopes; null takes the default.
final

Methods

buildOnError(BuildContext context, Object error, StackTrace stackTrace, Object? progress) → Widget
Built when the initialization failed.
buildOnProgress(BuildContext context, Object? progress) → Widget
Built while the initialization is running.
buildOnReady(BuildContext context, T data) → Widget
Built once the value is there, and receives it.
buildOnWaiting(BuildContext context) → Widget?
Built while waiting for a scopeKey and for the first event.
createElement() → InheritedElement
Inflates this configuration to a concrete instance.
inherited
createScopeElement() → _AsyncDataScopeElement<W, T>
Creates the element of this scope.
override
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
disposeData(T data) → FutureOr<void>
Releases the value initData produced; awaited.
initData(BuildContext context, ScopeInitContext ctx) → Future<T>
The initialization, ending with the value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onMount(BuildContext context) → void
Called when the scope is mounted, before the initialization starts.
onUnmount(T? data) → void
Called synchronously when the scope leaves the tree.
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, int wrapWidth = 65}) → 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({bool showHashCode = false}) → String
A short, textual description of this widget.
inherited
updateShouldNotify(covariant ScopeWidgetCore<W, _AsyncDataScopeElement<W, T>> oldWidget) → bool
Whether the framework should notify widgets that inherit from this widget.
inherited

Operators

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

Static Methods

maybeOf<W extends AsyncDataScopeBase<W, T>, T extends Object?>(BuildContext context, {required bool listen}) → AsyncDataScopeContext<W, T>?
The nearest scope W above context, or null.
override
of<W extends AsyncDataScopeBase<W, T>, T extends Object?>(BuildContext context, {required bool listen}) → AsyncDataScopeContext<W, T>
The nearest scope W above context.
override
select<W extends AsyncDataScopeBase<W, T>, T extends Object?, V extends Object?>(BuildContext context, V selector(AsyncDataScopeContext<W, T> context)) → V
Subscribes to one value of the scope and returns it.
override