No real-time firestore updates with Infinite Scroll on ListView

Database & APIs

Hello,

I need your help. I want to implement a simple chat. To do this, I have a document for each chat in the chat collection in Firestore, and a separate document for each message in the message subcollection.

I now want to display the messages in a ListView, but not all of them at the beginning to save on read operations.

If I use infinite scroll, new messages are no longer loaded in real time. If I use a normal StreamBuilder (not infinite scroll), then all messages are loaded directly. I can, of course, work around this with a limit in the backend query, but then I won't be able to reload older messages when scrolling up.

Does FlutterFlow offer any built-in way to solve this problem?

Thanks

What have you tried so far?

I tried to code a custom widget, but I didn't manage it to work

Did you check FlutterFlow's Documentation for this topic?
Yes
3
5 replies