PauseToken class

The PauseToken class is intended for pausing and resuming asynchronous operations.

Properties

hashCode int
The hash code for this object.
no setterinherited
isPaused bool
Returns true if the token is in a paused state.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runPausable<T>(FutureOr<void> onPause(), FutureOr<void> onResume(), FutureOr<T> action()) Future<T>
Execute an action that can be paused/resumed while it is being executed.
toString() String
A string representation of this object.
inherited
wait({CancellationToken? token}) Future<void>
Paused execution of the calling code while the token is in the paused state. If the token is not in the paused state, then execution of the calling code continues immediately.

Operators

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