isConnected method
Implementation
@override
Future<bool> isConnected() async {
try {
var connection = await connectivity.checkConnectivity();
return [ConnectivityResult.wifi, ConnectivityResult.mobile].contains(
connection,
);
} on PlatformException catch (_) {
rethrow;
}
}