Help me to Address Autocomplete

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.

this is the best video there is Location Search Autocomplete in Flutter | Speed code

which doesn’t fully fix my issue, I want my customers to be able to do this

Enable autocomplete for address fields using Google Maps | Helium Help Center

How do I approach that?

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

2 Likes

I will check it out as soon as my fingers approach the keyboard.

I will let you know if there is anything…thanks family.

1 Like