bazrafkan / google_place

A new Flutter package for handle google place api
MIT License
84 stars 122 forks source link

Impossible to sort getNearBySearch() by distance using rankby parameter #52

Open jbacco opened 2 years ago

jbacco commented 2 years ago

The documentation for getNearBySearch() states the following contradiction:

[radius] Required parameters - Defines the distance (in meters) within which to return place results. The maximum allowed radius is 50 000 meters. **Note that radius must not be included if rankby=distance (described under Optional parameters below) is **specified.**

[rankby] Optional parameters - Specifies the order in which results are listed. **Note that rankby must not be included if radius (described under Required parameters above) is specified.**

However, the radius parameter is a required parameter and non-nullable, so it's impossible to exclude it.