cancel method

void cancel()
inherited

Cancels this token and notifies onCancel listener.

Implementation

void cancel() => onCancel?.call();