vedartm / paginate_firestore

A flutter package to simplify pagination with firestore data 🗃
https://pub.dev/packages/paginate_firestore
MIT License
113 stars 136 forks source link

Rebuild with a new querry #69

Closed ben55j closed 3 years ago

ben55j commented 3 years ago

Hello,

I am trying to implement a search bar, and I need to change the query for every new search. Problem: The list does not refresh itself when I am changing the query using a setState.

Is it supposed to work that way? Do you recommend another solution ?

Thank you for your help, Benjamin

vedartm commented 3 years ago

Hi @ben55j. When you change the state, change the key of the PaginateFirestore widget as well by changing it's key. The widget will be forced to refresh as the key is changed.

ben55j commented 3 years ago

Works great, thank you!

vedartm commented 3 years ago

Thanks for using the package.