stop method

void stop()

Stops the timer and resets the state to zero.

This cancels any active Timer periodic task.

Implementation

void stop() {
  _timer?.cancel();
  emit(TimerState(secondsRemaining: 0, isRunning: false, isPaused: false));
}