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

Flutter web

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
70
pub points
55%
popularity

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

Documentation

API reference

Uploader

fastencoding@gmail.com

License

BSD (LICENSE)

Dependencies

flutter, flutter_mobx, mobx

More

Packages that depend on connectivity_web