autocomplete method
Future<PlacesAutocompleteResponse>
autocomplete(
- String input, {
- String? sessionToken,
- num? offset,
- Location? origin,
- Location? location,
- num? radius,
- String? language,
- List<String> types = const [],
- List<Component> components = const [],
- bool strictbounds = false,
- String? region,
})
Implementation
Future<PlacesAutocompleteResponse> autocomplete(
String input, {
String? sessionToken,
num? offset,
Location? origin,
Location? location,
num? radius,
String? language,
List<String> types = const [],
List<Component> components = const [],
bool strictbounds = false,
String? region,
}) async {
final url = buildAutocompleteUrl(
sessionToken: sessionToken,
input: input,
origin: origin,
location: location,
offset: offset,
radius: radius,
language: language,
types: types,
components: components,
strictbounds: strictbounds,
region: region,
);
return _decodeAutocompleteResponse(await doGet(url, headers: apiHeaders));
}