stream static method

Stream<List<ConnectivityResult>> stream()

Get a stream of connectivity changes.

Example:

NyConnectivity.stream().listen((results) {
  if (results.contains(ConnectivityResult.none)) {
    showOfflineMessage();
  }
});

Implementation

static Stream<List<ConnectivityResult>> stream() {
  return _connectivity.onConnectivityChanged;
}