onConnectivityChanged property

  1. @override
Stream<ConnectivityResult> onConnectivityChanged
override

Returns a Stream of ConnectivityResults changes.

Implementation

@override
Stream<ConnectivityResult> get onConnectivityChanged {
  _controller ??= StreamController<ConnectivityResult>.broadcast(
    onListen: _startListenConnectivity,
    onCancel: _stopListenConnectivity,
  );
  return _controller!.stream;
}