- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- ProxyWidget
- InheritedWidget
- ScopeInheritedWidget
- ScopeWidgetCore<AsyncDataScope<T>, _AsyncDataScopeElement<AsyncDataScope<T>, T>>
- ScopeModelCore<AsyncDataScope<T>, _AsyncDataScopeElement<AsyncDataScope<T>, T>, AsyncScopeModel>
- AsyncScopeCore<AsyncDataScope<T>, _AsyncDataScopeElement<AsyncDataScope<T>, T>>
- AsyncDataScopeCore<AsyncDataScope<T>, _AsyncDataScopeElement<AsyncDataScope<T>, T>, T>
- AsyncDataScopeBase<AsyncDataScope<T>, T>
- AsyncDataScope
Constructors
-
AsyncDataScope({Key? key, Object? tag, Object? scopeKey, Duration? scopeKeyTimeout, void onScopeKeyTimeout()?, Duration? initCancellationTimeout, void onInitCancellationTimeout()?, Duration? disposeScopeTimeout, void onDisposeScopeTimeout()?, Duration? waitForChildrenTimeout, void onWaitForChildrenTimeout()?, Duration? pauseAfterInitialization, void onMount(BuildContext context)?, required Stream<AsyncDataScopeInitState<Object, T>> initData(BuildContext context), void onUnmount(T? data)?, required FutureOr<void> disposeData(T data), Widget waitingBuilder(BuildContext context)?, required Widget progressBuilder(BuildContext context, Object? progress), required Widget builder(BuildContext context, T data), required Widget errorBuilder(BuildContext context, Object error, StackTrace stackTrace, Object? progress)})
-
Creates an asynchronous scope producing a value.
const
Methods
-
buildOnError(BuildContext context, Object error, StackTrace stackTrace, Object? progress)
→ Widget
-
Built when the initialization failed.
override
-
buildOnProgress(BuildContext context, Object? progress)
→ Widget
-
Built while the initialization is running.
override
-
buildOnReady(BuildContext context, T data)
→ Widget
-
Built once the value is there, and receives it.
override
-
buildOnWaiting(BuildContext context)
→ Widget?
-
Built while waiting for a
scopeKey and for the first event.
override
-
createElement()
→ InheritedElement
-
Inflates this configuration to a concrete instance.
inherited
-
createScopeElement()
→ _AsyncDataScopeElement<AsyncDataScope<T>, T>
-
Creates the element of this scope.
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
-
disposeData(T data)
→ FutureOr<void>
-
Releases the value initData produced; awaited.
override
-
initData(BuildContext context)
→ Stream<AsyncDataScopeInitState<Object, T>>
-
The initialization, ending with the value.
override
-
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.
override
-
onUnmount(T? data)
→ void
-
Called synchronously when the scope leaves the tree, and on the way out
of a
close().
override
-
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<AsyncDataScope<T>, _AsyncDataScopeElement<AsyncDataScope<T>, T>> oldWidget)
→ bool
-
Whether the framework should notify widgets that inherit from this widget.
inherited