cancel method

void cancel([
  1. Object? reason
])

Cancels token. Idempotent; the first reason wins.

Implementation

void cancel([Object? reason]) => token._cancel(reason);