dispose method

Future<void> dispose()

Dispose the resources

Marks the manager as gone before it lets the subscription go, so a flush already in flight does not write to a client that is closing.

Implementation

Future<void> dispose() async {
  _disposed = true;
  await _localChangesSubscription?.cancel();
  _localChangesSubscription = null;
}