start method

void start(
  1. int duration
)

Starts a new countdown timer for the specified duration in seconds.

If a timer is already running, it will be cancelled and restarted with the new duration.

Implementation

void start(int duration) {
  _timer?.cancel();
  _startTimer(duration);
}