felixmccuaig / flutter-autocomplete-textfield

An autocomplete Textfield for flutter
MIT License
181 stars 131 forks source link

How to use updateSuggestions? Example please #57

Open andresinostroza opened 5 years ago

andresinostroza commented 5 years ago

Basically I have wrapped the AutoCompleteTextField to add more functionality, but I have no idea how to update the suggestions in this new statefulWidget, When I tried in didUpdateWidget, i get an error

nabil-hfz commented 4 years ago

Hi @andresinostroza, If you assign a key object to your AutoCompleteTextField widget, you can call something like this on your key whenever you want to update Suggestions ===>

key.currentState.updateSuggestions(List items).

I hope this help.