Hello family, I wanted to create an address auto complete like in stripe checkout or another google api based address completer in flutter I can easily do that however my main issue is that when i fetch the address i want the to start filling in the line 1 and the —>, city, country, zip(postal) to also be automatically filled in.
There are several package options on pub.dev that implement different approaches to this.
In my own projects, where I was using Forms and FormFields, i found nothing that did exactly what I needed… and that is to start the automcomplete from the address field, but then on selection fill in city, state, zip (or other fields) from the selected address.
I found maps_places_autocomplete 0.0.2 by @leandro-zanardi which had clean code and I used that as my starting point and by the time I had something that worked easily for TextFields and TextFormFields it had diverged so much that I created a new package : google_maps_places_autocomplete_widgets | Flutter package
It has widgets that can be used as ‘drop-in’ replacements for any address fields in your app and can be wired to fill any other fields on address selection.
You can take a look at that and see how it fits in to the approach you are wanting to take. There are included examples that should illustrate how things work clearly.
Let me know if you have any questions
Flutter and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC.
Using contents of this forum for the purposes of training proprietary AI models is forbidden. Only if your AI model is free & open source, go ahead and scrape.