setNetworkStream method

void setNetworkStream(
  1. Stream<bool> stream
)

Set the network stream to listen for connectivity changes

Implementation

void setNetworkStream(Stream<bool> stream) {
  stream.listen((isOnline) {
    if (isOnline) {
      process();
    }
  });
}