Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocationResult return null #69

Open
s2yed opened this issue Jan 20, 2022 · 4 comments
Open

LocationResult return null #69

s2yed opened this issue Jan 20, 2022 · 4 comments

Comments

@s2yed
Copy link

s2yed commented Jan 20, 2022

result = await Navigator.of(context).push(MaterialPageRoute(
builder: (context) =>
PlacePicker(keyMap,
displayLocation: LatLng(lat,lon),
)));

print(result);
@jrcmadushanka
Copy link

Same for me.

@brianmutiso
Copy link

This library practically doesnt work and is neither useful for any reasonable use

@luislukas
Copy link

luislukas commented Apr 27, 2022

I was getting the same result until I did some debugging - turns out you have to enable billing in the project for Places Api to work.
After setting up billing and link it to the project it works perfectly.

Here are the details:
Error while debugging:

0 = {map entry} "error_message" -> "You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/bi..."
1 = {map entry} "predictions" -> [_GrowableList]
2 = {map entry} "status" -> "REQUEST_DENIED"

You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started

@fulcus
Copy link

fulcus commented Jul 6, 2022

Geocoding API needs to be enabled for the plugin to work and return actual place info (and not null), whereas the Places API is optional and needed only if you want to display "Places" such as restaurants etc.

Geocoding API: https://console.cloud.google.com/apis/library/geocoding-backend.googleapis.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants