autocomplete method

Future<PlacesAutocompleteResponse> autocomplete(
  1. String input, {
  2. String? sessionToken,
  3. num? offset,
  4. Location? origin,
  5. Location? location,
  6. num? radius,
  7. String? language,
  8. List<String> types = const [],
  9. List<Component> components = const [],
  10. bool strictbounds = false,
  11. 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));
}