felixmccuaig / flutter-autocomplete-textfield

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

suggestions comes from server? #52

Open aliazxs opened 5 years ago

aliazxs commented 5 years ago

your plugin is awesome man Thank you,

what if my suggestions comes from server so i had to display what the server returns?

AmazingBite commented 5 years ago

I suggest you to check BLoC Pattern. Here some helpful links. Those are explanations with examples made by Didier Boelens :

The basics with streams and BLoC pattern (Reactive Programming - Streams - BLoC) A bit deeper and practical exemple (Reactive Programming - Streams - BLoC - Practical Use Cases) A comparison between BLoC, ScopedModel and Redux (BLoC - ScopedModel - Redux - Comparison)

It helped me a lot and I hope you will find what you want too.

pyjavo commented 5 years ago

I am looking for something similar. It would be great if there is a feature that also allows you to make API requests.

codetinker commented 5 years ago

Same here. I would be great if we can update the suggestion list after received the response from api request

Wizzel1 commented 4 years ago

Anything new here ?

nabil-hfz commented 4 years ago

Hi @Wizzel1,

Anything new here ?

Yes, there are always new great things are created.

If you assign a key object to your AutoCompleteTextField / SimpleAutoCompleteTextField 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.

Wizzel1 commented 4 years ago

@nabil-hfz thanks !

Karlheinzniebuhr commented 3 years ago

Hi @Wizzel1,

Anything new here ?

Yes, there are always new great things are created.

If you assign a key object to your AutoCompleteTextField / SimpleAutoCompleteTextField 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.

After I updateSuggestions() the overlay pops up automatically without clicking the field. How can I prevent that from happening ?

nabil-hfz commented 3 years ago

@Karlheinzniebuhr

Can you please, provide the full code you use ?? Best reagrds.