OnCombined<T, R> class
Callbacks to be invoked depending on the combined state status of a list of Injected models
For more control on when to invoke the callbacks use:
- OnCombined.data: The callback is invoked only if all the Injected models have data.
- OnCombined.waiting: The callback is invoked if any of the injected models is waiting.
- OnCombined.error: The callback is invoked if all the injected models are not waiting and at least one of them has error.
See also: OnCombined.all, OnCombined.or.
- Available Extensions
Constructors
- OnCombined(R builder(T state))
-
The callback is always invoked when any of the Injected models emits a
notification.
Callbacks to be invoked depending on the combined state status of a
list of Injected models
factory
- OnCombined.all({required R onIdle(), required R onWaiting(), required R onError(dynamic error, void refresh()), required R onData(T state)})
-
Set of callbacks to be invoked when the Injected models emit
notifications with the corresponding state status.
factory
- OnCombined.data(R fn(T state))
-
The callback is invoked only when all the Injected models are in the
onData status.
factory
- OnCombined.error(R fn(dynamic error, void refresh()))
-
The callback is invoked only when any of the Injected models emits a
notification with error status and with no other model is waiting.
factory
- OnCombined.or({R onIdle()?, R onWaiting()?, R onError(dynamic error, void refresh())?, R onData(T state)?, required R or(T state)})
-
Set of callbacks to be invoked when the Injected models emit
notifications with the corresponding state status.
factory
- OnCombined.waiting(R fn())
-
The callback is invoked only when one of the Injected models emits a
notification with waiting status.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited