monitorConnection method

Stream<bool> monitorConnection()

Returns a stream that monitors the connectivity state of the device

Implementation

Stream<bool> monitorConnection() {
  return (_connectivityProvider?.call() ?? Connectivity())
      .onConnectivityChanged
      .map((event) => event != ConnectivityResult.none);
}