AsyncEditBuilder<T> class

A widget that allow to fetch a value asynchronously, and then to run another task asynchronously (to commit new value for instance) while updating UI with new value. Handle all states (loading, errors, onSuccess). It's actually a mix of FetchBuilder and AsyncTaskBuilder combined. Typically used for component that needs to fetch a value and then edit that value. Example : an async switch

Inheritance

Constructors

AsyncEditBuilder({Key? key, FetcherConfig? config, WidgetBuilder? fetchingBuilder, required AsyncValueGetter<T> fetchTask, required AsyncValueSetter<T> commitTask, required DataEditWidgetBuilder<T> builder, AsyncValueSetter<T>? onEditSuccess})
const

Properties

builder DataEditWidgetBuilder<T>
Child widget builder
final
commitTask AsyncValueSetter<T>
Task that commit modification If task throws, it will be properly handled
final
config FetcherConfig?
Widget configuration, that will override the one provided by DefaultFetcherConfig Config is applied to both FetchBuilder and AsyncTaskBuilder
final
fetchingBuilder WidgetBuilder?
Widget to display while fetching Default to config.fetchingBuilder If you want to change the committing widget, you should use config.fetchingBuilder instead.
final
fetchTask AsyncValueGetter<T>
Task that fetch value If task throws, it will be properly handled
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onEditSuccess AsyncValueSetter<T>?
Called after commitTask is successfully executed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<AsyncEditBuilder<T>>
Creates the mutable state for this widget at a given location in the tree.
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
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