checkInternet method

Future<bool> checkInternet()

Implementation

Future<bool> checkInternet() async {
  bool isConnected = false;
  ConnectivityResult connectivityResult = await _connectivity.checkConnectivity();
  if (connectivityResult != ConnectivityResult.none) {
    isConnected = await InternetConnectionChecker().hasConnection;
  }
  return isConnected;
}