startTimer method

void startTimer()

Implementation

void startTimer() {
  timer = Timer.periodic(const Duration(seconds: 1), (timer) {
    if (seconds > 0) {
      seconds--;
    } else {
      timer.cancel();
    }
    notifyListeners();
  });
}