findAutocompletePredictions method
Future<FindAutocompletePredictionsResponse>
findAutocompletePredictions(
- String query, {
- List<
String> ? countries, - List<
String> placeTypesFilter = const [], - bool? newSessionToken,
- LatLng? origin,
- LatLngBounds? locationBias,
- LatLngBounds? locationRestriction,
Fetches autocomplete predictions based on a query.
If countries
] is not null, the results are restricted to those countries.
AutocompletePrediction.distanceMeters is calculated from origin
,
if available. If origin
is null, no distances will be included in the
response.
When making multiple requests, a session token is saved on one request and the same is sent to the following ones
If newSessionToken
is null, a previously-saved session token will be used.
If there is no previously-saved session token exist, a request without
a session token will be saved and the result token will be saved.
For more about session tokens: https://developers.google.com/maps/documentation/places/android-sdk/session-tokens
Implementation
Future<FindAutocompletePredictionsResponse> findAutocompletePredictions(
String query, {
List<String>? countries,
List<String> placeTypesFilter = const [],
bool? newSessionToken,
LatLng? origin,
LatLngBounds? locationBias,
LatLngBounds? locationRestriction,
}) {
throw UnimplementedError(
'findAutocompletePredictions() has not been implemented.');
}