CancelToken class
A token that can be used to cancel an HTTP request. This token should be passed to the request method.
If the same token is passed to multiple requests, all of them will be cancelled when cancel is called.
If a cancelled token is passed to a request method, the request is cancelled immediately.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCancelled → bool
-
Whether the request has been successfully cancelled.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → CancelState
-
The current state of the token.
no setter
Methods
-
cancel(
) → Future< void> - Cancels the HTTP request. If the CancelToken is not passed to the request method, this method never finishes.
-
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