LikeMultiBuilder class
A builder that observes multiple LikeStateResponses and aggregates their states. It waits for all states to resolve before calling onSuccess. Matches the exact signature of the original MultiStateBuilder.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- LikeMultiBuilder
Constructors
-
LikeMultiBuilder({Key? key, required List<
LikeStateResponse Function()> observes, required Widget onSuccess(List results, bool isRefreshing, bool isFromStaleWhileRevalidate), Widget onLoading()?, Widget onIdle()?, Widget onError(LikeError error)?, Widget onException(String message)?, void listener(LikeState aggregatedState, List<LikeStateResponse> responses)?}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
listener
→ void Function(LikeState aggregatedState, List<
LikeStateResponse> responses)? -
An optional side-effect listener that triggers when the aggregated state or individual responses change.
final
-
observes
→ List<
LikeStateResponse Function()> -
A list of functions, each returning a LikeStateResponse to monitor.
final
- onError → Widget Function(LikeError error)?
-
Optional builder called when at least one state has an explicit LikeError.
final
- onException → Widget Function(String message)?
-
Optional builder called when at least one state has an unexpected exception.
final
- onIdle → Widget Function()?
-
Optional builder called when at least one state is in LikeState.idle.
final
- onLoading → Widget Function()?
-
Optional builder called when at least one state is in LikeState.loading.
Supports sticky behavior: if onSuccess was previously called, it remains visible.
final
- onSuccess → Widget Function(List results, bool isRefreshing, bool isFromStaleWhileRevalidate)
-
Builder function called when all observed states have successfully retrieved data.
Provides the list of results in the same order as observes.
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< LikeMultiBuilder> -
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, 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(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited