nhCheckConnect function
return boolean
if return true I am connected to a mobile network or wifi.
Implementation
Future<bool> nhCheckConnect() async {
var connectivityResult = await (Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.mobile) {
return true;
} else if (connectivityResult == ConnectivityResult.wifi) {
return true;
} else {
return false;
}
}