onNetworkConnected property

BehaviorSubject<bool> get onNetworkConnected

Emits true when the device has a network connection and false when it lost it.

The default returns a new subject seeded with true on every call. Override it with a field that your connectivity source feeds. Firestore skips the current value; every later true restarts the streams that failed, without waiting for their backoff, and the first event switches off the built-in connectivity detector of cloud_firestore_dart for good.

Implementation

BehaviorSubject<bool> get onNetworkConnected {
  return BehaviorSubject<bool>.seeded(true);
}