stopTimer method Null safety

void stopTimer()

Stops the timer.

Implementation

void stopTimer() {
  timer?.cancel();
}