NetworkStateNotifier constructor

NetworkStateNotifier(
  1. NetworkManager _manager
)

Creates a NetworkStateNotifier bound to the given NetworkManager.

Implementation

NetworkStateNotifier(this._manager) {
  _connectivitySub = _manager.stateStream.listen((s) {
    if (s is Offline || s is Syncing || s is Idle) {
      state = s;
    }
  });
}