Closed angwandi closed 2 years ago
I also run into this issue.
@bazrafkan would be great to remove "web" tag from pub.dev. I also run into this issue, just wasted 2h to realize web is not supported :)
Does somebody know why it's not supported? I really needed it for the web. Does any body know any other solution?
As a workaround, here is what I ended up doing.
final places = new GoogleMapsPlaces(
apiKey: googlePlacesApiKey,
baseUrl: kIsWeb
? 'https://[heroku app name].herokuapp.com/https://maps.googleapis.com/maps/api'
: null,
);
Note that you shouldn't use https://cors-anywhere.herokuapp.com as a proxy because it is a test set up, not meant to be used in real applications. I suspect that's why this proxy gets a FormatException.
Now supported web implementation in version 0.4.2
Instead of using this plugin, I created a utility class for Google places auto complete : https://arkapp.medium.com/flutter-and-google-map-for-beginners-part-1-fdba4ab22148
Places search and the overall package does not work on the web