start method

void start()

Implementation

void start() {
  _timer = Timer.periodic(const Duration(seconds: 1), (timer) {
    timeLeft--;

    if (timeLeft == 0) {
      _countdownState = CountdownState.ended;
      timer.cancel();
    }

    notifyListeners();
  });
  _countdownState = CountdownState.active;

  notifyListeners();
}