startTimer method

void startTimer()

Implementation

void startTimer() {
  const oneSec = Duration(seconds: 1);
  picTimer = Timer.periodic(
    oneSec,
    (Timer timer) => setState(
      () {
        if (seconds < 0) {
          timer.cancel();
        } else {
          seconds = seconds + 1;
        }
      },
    ),
  );
}