google_place
google_place copied to clipboard
Not return the Lat Long.
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?
Hi, I think you need to implement PlaceDetails to get the other parameters
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
I believe lat
& lng
is one of the most important features of a location picker.