cancel method

  1. @override
void cancel([
  1. Exception exception = const CancelledException()
])
override

Cancels the token.

This does not affect the merged tokens.

Implementation

@override
void cancel([Exception exception = const CancelledException()]) {
  if (_isCancelled) return;
  onCancel(exception);
}