Shrutimahajan / Google-AutoComplete-TextField-Flutter

MIT License
36 stars 114 forks source link

[CORS] Cors-anywhere is now in limited acces #58

Closed BaptisteBAYLE closed 2 months ago

BaptisteBAYLE commented 2 months ago

When we use the plugin on a web environment, the proxy cors-anywhere.herokuapp.com/ is added in front of the Google Maps API link. This request returns an unauthorized error while cors-anywhere restricted their proxy.

I suggest that the proxyURL can be passed as an input or an ENV_VARIABLE.

I use google_places_flutter: ^2.0.8 environment: sdk: ">=2.12.0 <3.0.0"

aykutuludag commented 2 months ago

I wrote exactly same suggestion about 2-3 months ago but they don't care I suppose. I'm not the first one detect this issue they detected nearly 2-3 years ago! This plugin either doesn't updated or they don't care Flutter Web. Because of that, I don't use this plugin anymore I switched to Yandex MapKit (customer request) as JS API. Now my app works on all 3 platforms.

https://github.com/Shrutimahajan/Google-AutoComplete-TextField-Flutter/issues/7#issuecomment-2198373741

Note: I added the link offical plugin of Google. Normally you would expect something spectacular because Flutter is a framework of Google, but you know the Google... They don't offer UI but at least that plugin works on all platforms.

Official plugin: https://pub.dev/packages/flutter_google_places_sdk