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

fix nullable field 'name' in place details #116

Closed

Conversation

daveols
Copy link

@daveols daveols commented May 4, 2021

The PlaceDetails name field can sometimes be null. This PR fixes the following error when this occurs:

_CastError (type 'Null' is not a subtype of type 'String' in type cast)

@daveols
Copy link
Author

daveols commented May 4, 2021

I found that in my implementation using the type from this package, place_id was coming through as null as well which didn't make any sense for a place details request. I got things working again by simply adding name,place_id to the fields I was requesting from Google.

@daveols daveols closed this May 4, 2021
@michaelgobbers
Copy link

I think this PR was still valid to be honest and will contribute to the plugin. There are use case where you don't want the name. I one of my use cases I actually just request geometry field to be able to show it on google_maps.

Are you willing to reopen? If not I don't mind creating another PR for it.

@daveols
Copy link
Author

daveols commented Jun 22, 2021

@michaelgobbers fair enough!

I've reopened the PR here at #126

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

Successfully merging this pull request may close these issues.

2 participants