state property

NetworkState get state

The current state.

Implementation

NetworkState get state => _state;
set state (NetworkState newState)

Set a new state and notify listeners.

Implementation

set state(NetworkState newState) {
  _state = newState;
  if (!_controller.isClosed) {
    _controller.add(newState);
  }
}