talira

connectivity_plus

Flutter plugin for checking network connectivity (Wi-Fi, mobile, Ethernet, VPN)

open sourceBSD-3-Clausefree

connectivity_plus is a Flutter plugin that tells an app which network connections are available: Wi-Fi, mobile data, Ethernet, VPN, Bluetooth, satellite, another network or none. An app can check the current state or listen to a stream of changes, and which types each platform can report differs (Bluetooth only on Android and Linux, VPN on Android, Windows and Linux). On the web it uses the browser's experimental NetworkInformation API. It's one of the Flutter Community's plus_plugins, maintained in the fluttercommunity/plus_plugins repository.

Problems it solves

  • check whether my Flutter app is on Wi-Fi or mobile data before downloading something large
  • show an offline banner in my Flutter app when the device loses its network connection
  • react in a Flutter app when the network connection changes from Wi-Fi to cellular
  • detect whether a VPN or Ethernet connection is active from Flutter code

Features

  • Reports Wi-Fi, mobile, Ethernet, VPN, Bluetooth, satellite, other and none
  • Stream of connectivity changes
  • Android, iOS, Linux, macOS, web and Windows

Limitations

  • Doesn't tell you whether the internet is reachable: it reports the connection type, which may have no internet access (behind a captive portal, for example)1

Alternatives

The same job

These do what connectivity_plus does.

  1. internet_connection_checker Checks whether a Dart or Flutter app can actually reach the internet, and detects slow connections.

Compare connectivity_plus with the top 3