CancelToken class

Constructors

CancelToken()

Properties

cancelReason → String?
The reason for cancellation.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isCancelled → bool
Whether the request has been cancelled.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel([String? reason]) → void
Cancels the request.
clearCallbacks() → void
Clears all callbacks.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeCallback(void callback(String?)) → void
Removes a cancellation callback.
reset() → void
Resets the cancellation state (for testing).
toString() → String
A string representation of this object.
override
whenCancel(void callback(String?)) → void
Adds a cancellation callback.

Operators

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