startMemoryTimer method

void startMemoryTimer()

Implementation

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