isNetworkConnected static method
Implementation
static Future<bool> isNetworkConnected() async {
var connectivityResult = await (Connectivity().checkConnectivity());
return connectivityResult.contains(ConnectivityResult.mobile) ||
connectivityResult.contains(ConnectivityResult.wifi) ||
connectivityResult.contains(ConnectivityResult.other);
}