DelegatingAsyncAction<V> class abstract

A delegating mixin of the AsyncAction class.

Implemented types

Constructors

DelegatingAsyncAction()

Properties

cancelled bool
Indicates whether the action has been cancelled.
no setteroverride
delegate AsyncAction<V>
no setter
hashCode int
The hash code for this object.
no setterinherited
isDone bool?
Indicates that the action has either completed or was cancelled.
no setteroverride
onDefer Future<bool>
A Future which resolves only if an action has not been cancelled, and and before the action execution. Use this future to begin a chain for #defer. Beginning a chain with this future allows for lazy evaluation of the deferring future. This future resolves to false if the action has been cancelled. If the action is cancelled, no futures registered with defer will be awaited before resolving the onDone future.
no setteroverride
onDone Future<V>
Future which resolves to null if the action is cancelled. If the execution is not cancelled, the future resolves to whatever the execution returns.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() → void
Synchronously cancel the action. Once called, all future calls to cancelIf and defer will have no effect, nor will any futures previously registered with cancelIf be awaited before resolving the onDefer and onDone futures.
override
cancelIf(Future<bool> whetherToCancel) → void
Register whetherToCancel to later decide whether to cancel. It is expected that whatever async processing required to determine whether to cancel the action is started by the action receiver. The resolved value will only be looked at once the action broadcaster has attempted to execute.
override
defer(Future executionDeferral) → void
Defer the action execution, if the action is not already executed or canceled. Use onDefer to delay starting your executionDeferral until the action is ready to execute.
override
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