close method Null safety

void close()

Implementation

void close() {
  if (_updateTimer != null) {
    _updateTimer!.cancel();
  }
  Console.eraseDisplay();
  Console.moveCursor(row: 1, column: 1);
  stdin.echoMode = true;
}