reset method

void reset()

Resets the timer.

Sets the timer to its original duration and rearms it if it was already expired (so it can be started again).

Does not change whether the timer isActive or isPaused.

Implementation

void reset() {
  if (isCancelled) return;
  _stopwatch = clock.stopwatch();
  if (isActive) {
    _timer!.cancel(); // it has to be non-null if it's active
    _startTimer();
  }
}