Skip to content

Issue running with Flutter Web #3

@coldfingersnz

Description

@coldfingersnz

Hi Tim,

I like the look of your plugin and would like to use it; however, I am having difficulties getting the example to run in my Flutter web app.

I am in New Zealand and so in the example, I changed componentCountry to 'nz' (in 5 places)

I changed my index.html to match yours. (Although I'm not sure what it does :-))

Unfortunately, I get the following error when I try: (--removed MYKEY)

RethrownDartError: ClientException: Failed to fetch,
uri=https://maps.googleapis.com/maps/api/place/autocomplete/json?input=754c&types=%28cities%29&key=MY_KEY&sessiontoken=e2d75994-5df3-4850-9d1b-afeed992fde5&language=en-Us
&components=country%3Anz

If I paste this into the browser I get a valid response. (I get the same valid response if I change the last part of the URL to &components=country:nz as well)

The only other thing is when the app starts I see:

Warning: In index.html:40: Local variable for "serviceWorkerVersion" is deprecated. Use "{{flutter_service_worker_version}}" template token instead. See
https://docs.flutter.dev/platform-integration/web/initialization for more details.

Wondering if you had some pearls of wisdom.

Regards Dave

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions