PauseToken class

A PauseToken is a mechanism for cooperative pause/resume of asynchronous operations.

Properties

hashCode int
The hash code for this object.
no setterinherited
isPaused bool
Returns the state of the token.
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>
Performs the following actions:
toString() String
A string representation of this object.
inherited
wait({CancellationToken? token}) Future<void>
If the token is in the paused state, then it pauses execution of the calling code until it receives the resume signal.
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