isInternetBack method

dynamic isInternetBack({
  1. required dynamic internetStatus(
    1. bool
    ),
})

Implementation

isInternetBack({required Function(bool) internetStatus}) async {
  bool isConnected = await InternetConnectionChecker().hasConnection;

  if (isConnected) {
    _removeNoInternet();
    internetStatus(true);
  } else {
    return internetStatus(false);
  }
}