update connectivity_plus package to the latest version
update connectivity_plus package to the latest version to avoid packages dependency resolving issues with other packages that depend on js 0.7.1 (e.g syncfusion_flutter_pdfviewer: ^25.1.39)
@bw-flagship Any chance we could get this merged soon?
@FXschwartz I am fine with the upgrade, but it seems that an analyzer warning was introduced that need to be fixed before merging
@AlaaEddineCharbib I made the necessary change but don't have permission to push to your fork. The analyzer is complaining because Connectivity().checkConnectivity() returns a list of results and on line 69 of smart_network_asset_loader.dart we are doing just an equality check.
The change should be to make it use .contains like below.
Future<bool> isInternetConnectionAvailable() async {
final connectivityResult = await Connectivity().checkConnectivity();
if (connectivityResult.contains(ConnectivityResult.none)) {
return false;
} else {
try {
final result = await InternetAddress.lookup('google.com');
if (result.isNotEmpty && result[0].rawAddress.isNotEmpty) {
return true;
}
} on SocketException catch (_) {
return false;
}
}
return false;
}