cancel method

void cancel()

cancel the timer, preventing function from being run

Implementation

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