onPause method
void
onPause()
Implementation
void onPause() {
setState(() {
currentStatus = ClockStatus.pause;
});
if (startTime != 0) {
final serverTime = DateTime.now().millisecondsSinceEpoch;
final timerDuration = serverTime - startTime;
final seconds = startSeconds + (timerDuration ~/ 1000);
if (seconds != currentSeconds) {
currentSeconds = seconds;
updateClock();
}
}
stopTimer();
updateTask();
}