connectivity_web 0.1.0+2 copy "connectivity_web: ^0.1.0+2" to clipboard
connectivity_web: ^0.1.0+2 copied to clipboard

Flutter Web package, that allows you check internet status anytime or listen to change events, using the MobX lib as state management.

Flutter Web Package (connectivity_web) #

A Flutter web package, that allows you to check internet status anytime or listen to event changes. There is a pre-built widget [OnOffWidget] to make things simple.

Check internet status anytime #

bool isOnline = ConnectivityWeb().isOnline.value;

Use the pre-built widget to display internet status in the screen #

OnOffWidget(
  online: Icon(Icons.signal_wifi_4_bar, color: Colors.green),
  offline: Icon(Icons.signal_wifi_off, color: Colors.red)
);

Listen events #

ConnectivityWeb().isOnline.observe((isOnline) {
  if (isOnline.newValue != isOnline.oldValue) print(isOnline.newValue);
});

You can find the full example here with Observer, Reaction, StreamController and OnOffWidget. #

Browser Internet Status Compatibility #

RTT Compatibility (Round-Trip Time) experimental technology #

4
likes
40
pub points
39%
popularity

Publisher

unverified uploader

Flutter Web package, that allows you check internet status anytime or listen to change events, using the MobX lib as state management.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, flutter_mobx, mobx

More

Packages that depend on connectivity_web