goOffline method

void goOffline()

Disconnects from the server and stays offline until goOnline. Writes stay queued and listeners keep their data. Synchronous and idempotent, valid before the first operation (that operation then does not connect); a no-op after close, after app.delete() is called, or after a failed start.

Implementation

void goOffline() {
  if (!isClosed) {
    _withRepo((Repo repo) => repo.interrupt());
  }
}