stop method

void stop()

Stops the task

Implementation

void stop() {
  timer?.cancel();
  timer = null;
  _state.stop();
}