Cancellable<T> class

This contains the Response of a request and a cancel method On making a request, it returns the Cancellable object immediately without waiting for the request to complete. The user can cancel the request by calling the cancel method before the response arrives. It is safe to call the cancel method, even after the response arrives. In that case, the cancel method will do nothing.

Constructors

Cancellable(Completer<Response<T>> _completer, {dynamic onCancel()?, Object? meta})

Properties

cancelled bool
no setter
hashCode int
The hash code for this object.
no setterinherited
meta Object?
Http Worker returns a record of Completer and meta. This meta can hold any information, depends on the implementation of the HttpWorker.
final
onCancel ↔ (dynamic Function()?)
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() → dynamic
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