pause method Null safety

void pause()

Implementation

void pause() {
  paused = true;
}