hasNetwork method

Future<bool> hasNetwork()

Implementation

Future<bool> hasNetwork() async {
  final result = await Connectivity().checkConnectivity();
  return !result.contains(ConnectivityResult.none);
}