startTimer method

void startTimer()

Implementation

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