cancel method

  1. @override
void cancel([
  1. Exception? exception
])
override

Cancels the token.

This does not affect the merged tokens.

Implementation

@override
void cancel([Exception? exception]) {
  if (isCancelled) return;
  onCancel(exception ?? CancelledException());
}