Open jt274 opened 4 months ago
Thank you for pointing out the issue. We are in the midst of consolidating our API interface on flutter. Do expect an update to our interface and our documentations soon.
Hi @jt274 we just released a new version of flutter https://github.com/radarlabs/flutter-radar/releases/tag/3.10.0-beta.2 that tidies up our interface a little. It should address the issue you are facing. The documentations are not yet yet released as this update is still in beta, but feel free to ask questions you have about our interface here for the time being.
For the
Radar.autocomplete
function, all parameters are listed as nullable. If thenear
parameter is not included, which according to the API reference docs is optional, the following error is returned by the SDK:{error: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.HashMap.get(java.lang.Object)' on a null object reference}
This package often doesn't seem to follow the API references. For the autocomplete API,
query
is required, whilenear
,layers
,limit
,country
,mailable
are optional. Theflutter-radar
package shows all parameters as nullable and returns the above error ifnear
is null.Source: https://radar.com/documentation/api#autocomplete