searchByText method

Future<PlacesSearchResponse> searchByText(
  1. String query, {
  2. Location? location,
  3. num? radius,
  4. PriceLevel? minprice,
  5. PriceLevel? maxprice,
  6. bool opennow = false,
  7. String? type,
  8. String? pagetoken,
  9. String? language,
  10. String? region,
})

Implementation

Future<PlacesSearchResponse> searchByText(
  String query, {
  Location? location,
  num? radius,
  PriceLevel? minprice,
  PriceLevel? maxprice,
  bool opennow = false,
  String? type,
  String? pagetoken,
  String? language,
  String? region,
}) async {
  final url = buildTextSearchUrl(
    query: query,
    location: location,
    language: language,
    region: region,
    type: type,
    radius: radius,
    minprice: minprice,
    maxprice: maxprice,
    pagetoken: pagetoken,
    opennow: opennow,
  );
  return _decodeSearchResponse(await doGet(url, headers: apiHeaders));
}