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

returns null subtype err while getting getDetailsByPlaceId #143

Open
wrteam02 opened this issue Mar 23, 2023 · 1 comment
Open

returns null subtype err while getting getDetailsByPlaceId #143

wrteam02 opened this issue Mar 23, 2023 · 1 comment

Comments

@wrteam02
Copy link

Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
E/flutter ( 7790): #0 _$PlacesDetailsResponseFromJson (package:google_maps_webservice/src/places.g.dart:294:50)
E/flutter ( 7790): #1 new PlacesDetailsResponse.fromJson (package:google_maps_webservice/src/places.dart:838:7)
E/flutter ( 7790): #2 GoogleMapsPlaces._decodeDetailsResponse (package:google_maps_webservice/src/places.dart:528:29)
E/flutter ( 7790): #3 GoogleMapsPlaces.getDetailsByPlaceId (package:google_maps_webservice/src/places.dart:126:12)

@casumatt
Copy link

An update on this item please. Here is the code (Flutter/Dart) causing the issues. If I remove the field mask it works fine.

PlacesDetailsResponse detail = await places.getDetailsByPlaceId(
            addressPlaceId,
            fields: ['places.location'],
          );

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