isConnectedToMobile function

Future<bool> isConnectedToMobile()

returns true if connected to mobile

Implementation

Future<bool> isConnectedToMobile() async {
  var connectivityResult = await Connectivity().checkConnectivity();
  return connectivityResult == ConnectivityResult.mobile;
}