autocomplete method
Future<PlacesAutocompleteResponse>
autocomplete({
- required String input,
- PlaceAutocompleteRequestOptions? options,
The Place Autocomplete API returns place predictions in response of a textual search string and optional geographic bounds.
Specify options
to get more specific results
Usage example:
final googleMapsApi = GoogleMapsApi(apiKey: "MY_API_KEY");
PlacesAutocompleteResponse response =
await googleMapsApi.places.autocomplete(
input: "Paris, Fr",
);
Find the official Google Maps Places autocomplete API documentation here
Implementation
Future<PlacesAutocompleteResponse> autocomplete({
required String input,
PlaceAutocompleteRequestOptions? options,
}) async {
return _autocompleteService.autocomplete(input: input, options: options);
}