lejard-h / google_maps_webservice

BSD 3-Clause "New" or "Revised" License
168 stars 225 forks source link

returns null subtype err while getting getDetailsByPlaceId #143

Open wrteam02 opened 1 year ago

wrteam02 commented 1 year ago

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 commented 3 months ago

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'],
          );