connectivity 0.0.1+1 copy "connectivity: ^0.0.1+1" to clipboard
connectivity: ^0.0.1+1 copied to clipboard

discontinued
outdatedDart 1 only

Allows developers to discover the state of the network connectivity.

connectivity #

This plugin allows Flutter apps to discover network connectivity and configure themselves accordingly. It can distinguish between cellular vs wifi connection.

Note that on Android, this does not guarantee connection to Internet. For instance, the app might have wifi access but it might be a VPN or a hotel Wifi with no access.

Sample usage:

import 'package:connectivity/connectivity.dart' as connectivity;

var connectivityResult = await connectivity.checkConnectivity();
if (connectivityResult == ConnectivityResult.mobile) {
  // I am connected to a mobile network.
} else if (connectivityResult == ConnectivityResult.wifi) {
  // I am connected to a wifi network.
}

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

1867
likes
0
pub points
99%
popularity

Publisher

verified publisherflutter.dev

Allows developers to discover the state of the network connectivity.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on connectivity