checkConnectivity method

Future<List<ConnectivityResult>> checkConnectivity()

Checks the connection status of the device.

Do not use the result of this function to decide whether you can reliably make a network request, it only gives you the radio status. Instead, listen for connectivity changes via onConnectivityChanged stream.

The returned list is never empty. In case of no connectivity, the list contains a single element of ConnectivityResult.none. Note also that this is the only case where ConnectivityResult.none is present.

Implementation

Future<List<ConnectivityResult>> checkConnectivity() {
  return _platform.checkConnectivity();
}