Open sentd94 opened 2 years ago
same happen here, did you find a solution for this?
I resolved this by making sure the text that is on the TextFormField should not be any of the suggested locations Just edit the google_places_flutter from dependancy level and edit line 100 from
alPredictions.addAll(subscriptionResponse.predictions!);
to
subscriptionResponse.predictions!.removeWhere((element)=> element.description==text); alPredictions.addAll(subscriptionResponse.predictions!);
This will solve this problem
The thing is overlay is not removed if latlong fetch is not enabled, so here change is needed:
if (!widget.isLatLngRequired){
removeOverlay(); // added
return;
}
When selecting a prediction, the prediction text is put into the text field. This might trigger a text change and therefore another prediction search with just 1 result matching the result from the first search.