startCountDown2 method

void startCountDown2()

Implementation

void startCountDown2() {
  if (_isClosed) return;
  isCountingDown2.value = true;
  _timer2 = Timer.periodic(const Duration(seconds: 1), (timer) {
    if(timer.tick > totalDuration()){
      isCountingDown2.value = false;
      timer.cancel();
      onStop();
      return;
    }
    countDownTime2.value = totalDuration() - timer.tick;
    if (countDownTime2.value == 0) {
      isCountingDown2.value = false;
      timer.cancel();
      onStop();
      return;
    }
  });
}