networkCheck static method
Implementation
static Future<bool> networkCheck() async {
bool result = false;
try {
final connectivityResult = await (Connectivity().checkConnectivity());
if (connectivityResult == ConnectivityResult.mobile ||
connectivityResult == ConnectivityResult.wifi) {
result = true;
}
} catch (e) {
result = true;
}
return result;
}