connectionChecker static method
Implementation
static Future<bool> connectionChecker() async {
try {
final result = await InternetAddress.lookup('www.google.com');
if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) {
print(result);
return true;
} else {
return false;
}
} on SocketException catch (_) {
return false;
}
}