cancel abstract method

void cancel()

Cancels the wait and disposes the underlying effect.

Does not complete the future. The future remains pending indefinitely. Do not await after calling cancel—the await will not resolve.

Has no effect if the condition was already met or cancel was already called. Use isCancelled to check whether cancel was invoked.

Implementation

void cancel();