hasConnection method

Future<bool> hasConnection()

Returns true if the device is connected to an IP network

Implementation

Future<bool> hasConnection() async {
  return await getConnectivityResult() != ConnectivityResult.none;
}