AsyncAction<TResult, TState> class
abstract
An action that contains async logic
- Inheritance
-
- Object
- ActionBase<
Future< TResult> , TState> - AsyncAction
- Implementers
Constructors
Properties
- cancelled → bool
-
is action dispatching cancelled
no setterinherited
-
cubix
→ Cubix<
TState> -
no setterinherited
- dispatched → bool
-
no setterinherited
- dispatcher ↔ Dispatcher
-
latefinalinherited
- done → bool
-
no setterinherited
- error → Object?
-
retrieve error of dispatching if any. An error will be thrown when trying access this prop before dispatching
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
result
→ Future<
TResult> ? -
retrieve action result after dispatching. An error will be thrown when trying access this prop before dispatching
no setterinherited
-
rules
→ List<
Rule> -
dispatching rules. Refer debounce(), throttle(), sequential() rules for further info
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state ↔ TState
-
retrieve current state of the cubix
getter/setter pairinherited
- success → bool
-
no setterinherited
Methods
-
all<
TKey> (Map< TKey, Object?> awatiable) → Future<Map< TKey, Object?> > -
inherited
-
allSettled<
TKey> (Map< TKey, Object?> awatiable) → Future<Map< TKey, Object?> > -
inherited
-
body(
) → Future< TResult> -
inherited
-
cancel(
) → void -
inherited
-
canDispatch(
Cubix cubix) → bool -
inherited
-
dispatch<
TActionResult> (ActionBase< TActionResult, TState> action, {CancelToken? cancelToken}) → TActionResult -
inherited
-
dispose(
) → void -
inherited
-
inject(
DependencyResolver resolver) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on(
{VoidCallback? done, VoidCallback? success, VoidCallback? dispose, void error(Object)?}) → void -
inherited
-
onBind(
Dispatcher dispatcher) → void -
inherited
-
onDispatch(
) → void -
inherited
-
onDispose(
) → void -
inherited
-
onDone(
) → void -
inherited
-
onError(
Object error) → void -
inherited
-
onInit(
) → void -
inherited
-
onSuccess(
) → void -
inherited
-
race<
TKey> (Map< TKey, Object?> awatiable) → Future<Map< TKey, Object?> > -
inherited
-
resolve<
T extends IDependency> (T create(), {Object? family}) → T -
inherited
-
selfDispatch(
Cubix< TState> cubix, {CancelToken? cancelToken}) → void -
dispatch this action with specified cubix
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
wait(
) → Future< TResult> -
wait until action dispatching is completed. The future object is completed with the action result if the action dispatches successfully, unless it is completed with an error
override
-
watch(
List< Cubix> cubixes) → Future<void> -
watch changes of cubixes, unlikely cubix.watch(), this method returns a future object that is completed when given cubixes are changed
inherited
-
when(
bool predicate(Object action), {Cubix? cubix}) → Future< Object> -
this method returns a future object that is completed when the dispatching action is satisfied the given predicate
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited