Cancelable<O> class

Implemented types
Available Extensions

Constructors

Cancelable({required Completer<O> completer, void onCancel()?, void onPause()?, void onResume()?, Task? task})
Cancelable.fromFuture(Future<O> future)
factory
Cancelable.justError(Object error)
factory
Cancelable.justValue(O value)
factory

Properties

future Future<O>
no setter
hashCode int
The hash code for this object.
no setterinherited
port TypeSendPort?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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
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<R>> cancelables) Cancelable<Iterable<R>>