checkInternetConnection function

Future checkInternetConnection(
  1. dynamic context
)

Implementation

Future checkInternetConnection(context) async {
  try {
    final response = await InternetAddress.lookup('www.google.com');
    if (response.isNotEmpty) {}
  } on SocketException catch (err) {
    Get.to(CommonInternetChecker());
  }
}