Seems that I am unable to complete a nearby search ranked by distance.
The radius parameter is required leading to an Invalid request when a rankBy parameter is used.
NearBySearchResponse result = await googlePlace.search.getNearBySearch(
Location(lat: position.latitude, lng: position.longitude),
searchRadius, //required
type: searchType,
opennow: false,
keyword: searchKeywords,
rankby: RankBy.Distance, //can only be used if a radius is not specified,
);
Seems that I am unable to complete a nearby search ranked by distance.
The radius parameter is required leading to an Invalid request when a rankBy parameter is used.