'Is there any flutter web package for google place autocomplete/search with javascript sdk?

I have tried manually using https://maps.googleapis.com/maps/api/place/autocomplete/json ?input=hyderabad&key=YOUR_API_KEY api but when I deploy app to server, CORS issue occurs.

CORS Error :

Access to XMLHttpRequest at 'https://maps.googleapis.com/maps/api/place/autocomplete/json?input=duragm+cheruvu&key=YOUR-API' from origin 'https://somedomain.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

How to get rid of this CORS error after deployment? Or can we have any flutter web package?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source