Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete null object reference error #56

Open
jt274 opened this issue Jul 18, 2024 · 2 comments
Open

Autocomplete null object reference error #56

jt274 opened this issue Jul 18, 2024 · 2 comments

Comments

@jt274
Copy link
Contributor

jt274 commented Jul 18, 2024

For the Radar.autocomplete function, all parameters are listed as nullable. If the near 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, while near, layers, limit, country, mailable are optional. The flutter-radar package shows all parameters as nullable and returns the above error if near is null.

Source: https://radar.com/documentation/api#autocomplete

@KennyHuRadar
Copy link
Contributor

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.

@KennyHuRadar
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants