While searching for "Canada" with placeID: ChIJ2WrMN9MDDUsRpY9Doiq3aJk the following unhandled exception occurs:
E/flutter (29191): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'int' is not a subtype of type 'double?'
E/flutter (29191): #0 new Location.fromJson (package:google_places_flutter/model/place_details.dart:172:5)
E/flutter (29191): #1 new Viewport.fromJson (package:google_places_flutter/model/place_details.dart:192:15)
E/flutter (29191): #2 new Geometry.fromJson (package:google_places_flutter/model/place_details.dart:149:15)
E/flutter (29191): #3 new Result.fromJson (package:google_places_flutter/model/place_details.dart:68:15)
E/flutter (29191): #4 new PlaceDetails.fromJson (package:google_places_flutter/model/place_details.dart:9:38)
E/flutter (29191): #5 _GooglePlaceAutoCompleteTextFieldState.getPlaceDetailsFromPlaceId (package:google_places_flutter/google_places_flutter.dart:254:46)
This is due the lat/lng of the viewport of this place, as they have no decimals, they are treated as int. When getPlaceDetailsFromPlaceId calls the following url:
While searching for "Canada" with placeID: ChIJ2WrMN9MDDUsRpY9Doiq3aJk the following unhandled exception occurs:
This is due the lat/lng of the viewport of this place, as they have no decimals, they are treated as int. When getPlaceDetailsFromPlaceId calls the following url:
it fails to parse:
at _placedetails.dart line #172:
it could be fixed with the following change, to this and the following line:
Thanks!