getConnectionStatus static method

Future<bool> getConnectionStatus()

Implementation

static Future<bool> getConnectionStatus() async {
  ConnectivityResult internetStatus = await Connectivity().checkConnectivity();
  if(internetStatus == ConnectivityResult.none){
    return false;
  }
  else{
    return true;
  }
}