CancellationToken class
Cancellation token for async operations
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCancelled → bool
-
Whether the operation has been cancelled
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
) → void - Cancel the operation
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onCancel(
dynamic callback()) → void - Register a callback to be called when cancelled
-
removeCallback(
dynamic callback()) → void - Remove a callback
-
throwIfCancelled(
) → void - Check if cancelled and throw if so
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited