google_place icon indicating copy to clipboard operation
google_place copied to clipboard

Not return the Lat Long.

Open panchalAlpit opened this issue 3 years ago • 3 comments

void autoCompleteSearch(String value) async { var result = await googlePlace.autocomplete.get(value); if (result != null && result.predictions != null && mounted) { setState(() { predictions = result.predictions; }); } }

We have implemented the above code but "predictions" only return the below parameter.

AutocompletePrediction({ this.description, this.distanceMeters, this.id, this.matchedSubstrings, this.placeId, this.reference, this.structuredFormatting, this.terms, this.types, });

So how can I get the latitude and longitude?

panchalAlpit avatar Aug 05 '21 07:08 panchalAlpit

Hi, I think you need to implement PlaceDetails to get the other parameters

lasd14 avatar Jan 14 '22 14:01 lasd14

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

abdulrehmank7 avatar Mar 14 '22 06:03 abdulrehmank7

I believe lat & lng is one of the most important features of a location picker.

contactjavas avatar Oct 14 '22 15:10 contactjavas