checkInternet static method
Implementation
static Future<bool> checkInternet() async {
try {
var connectivityResult = await (Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.none) {
return false;
} else {
return true;
}
} catch (e) {
return false;
}
}