cancel method

void cancel()

Stops a pending timeout (more input arrived, or the loop is ending).

Implementation

void cancel() {
  _timer?.cancel();
  _timer = null;
}