dispose method

void dispose()

Cancels the timer and drops any pending run.

Implementation

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