Cancelable<R> class

Implemented types
Available Extensions

Constructors

Cancelable({required Completer<R> completer, void onCancel()?})
Cancelable.fromFuture(Future<R> future)
factory

Properties

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

Methods

asStream() Stream<R>
Creates a Stream containing the result of this future.
override
cancel() → void
catchError(Function onError, {bool test(Object error)?}) Future<R>
Handles errors emitted by this Future.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
then<T>(FutureOr<T> onValue(R value), {Function? onError}) Future<T>
Register callbacks to be called when this future completes.
override
thenNext<T>(FutureOr<T> onValue(R value), [FutureOr<T> onError(Object error)?]) Cancelable<T>
timeout(Duration timeLimit, {FutureOr onTimeout()?}) Future<R>
Stop waiting for this future after timeLimit has passed.
override
toString() String
A string representation of this object.
inherited
whenComplete(FutureOr action()) Future<R>
Registers a function to be called when this future completes.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

mergeAll<T>(Iterable<Cancelable<T>> cancelables) Cancelable<Iterable<T>>