buildQueryAutocompleteUrl method
Implementation
String buildQueryAutocompleteUrl({
required String input,
num? offset,
Location? location,
num? radius,
String? language,
}) {
final params = <String, String>{
'input': input,
};
if (language != null) {
params['language'] = language;
}
if (location != null) {
params['location'] = location.toString();
}
if (radius != null) {
params['radius'] = radius.toString();
}
if (offset != null) {
params['offset'] = offset.toString();
}
if (apiKey != null) {
params['key'] = apiKey!;
}
return url
.replace(
path: '${url.path}$_queryAutocompleteUrl',
queryParameters: params,
)
.toString();
}