Cancelable<O> class
- Implemented types
-
- Future<
O>
- Future<
- Available Extensions
Constructors
-
Cancelable(Completer<
O> _completer, {void onCancel()?, void onPause()?, void onResume()?}) -
Cancelable.fromFuture(Future<
O> future) -
factory
- Cancelable.justError(Object error)
-
factory
- Cancelable.justValue(O value)
-
factory
Properties
Methods
-
asStream(
) → Stream< O> -
Creates a Stream containing the result of this future.
override
-
cancel(
) → void -
catchError(
Function onError, {bool test(Object error)?}) → Future< O> -
Handles errors emitted by this Future.
override
-
next<
R> ({FutureOr< R> onValue(O value)?, FutureOr<R> onError(Object error)?}) → Cancelable<R> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → void -
resume(
) → void -
then<
R> (FutureOr< R> onValue(O value), {Function? onError}) → Future<R> -
Register callbacks to be called when this future completes.
override
-
thenNext<
R> (FutureOr< R> onValue(O value)?, [FutureOr<R> onError(Object error)?]) → Cancelable<R> -
timeout(
Duration timeLimit, {FutureOr onTimeout()?}) → Future< O> -
Stop waiting for this future after
timeLimit
has passed.override -
toString(
) → String -
A string representation of this object.
inherited
-
whenComplete(
FutureOr action()) → Future< O> -
Registers a function to be called when this future completes.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
mergeAll<
R> (Iterable< Cancelable< cancelables) → Cancelable<R> >Iterable< R> >