onConnectivityChanged property

Stream<ConnectivityResult> onConnectivityChanged

Fires whenever the connectivity state changes.

Implementation

Stream<ConnectivityResult> get onConnectivityChanged {
  if (_onConnectivityChanged == null) {
    _onConnectivityChanged = eventChannel
        .receiveBroadcastStream()
        .map((dynamic event) => _parseConnectivityResult(event));
  }
  return _onConnectivityChanged;
}