Scroll to bottom of ListView on new data from backend query

I have a chat-like app which has a ListView connected to a Firestore backend query of documents (not a single document, but a collection of documents, one per message).

I need to make the ListView scroll to the bottom on any new message from the backend, is there a way to do this?

I tried to set a "On Data Update" with "Scroll To" action, but the ListView gets scrolled to the end BEFORE the updated message goes into it, so it's no use.

Thanks


PS: Also, a related (seemingly a bug): for some reason, "On Data Update" did not appear at all on the ListView I was working on, even though the backend query and everything else was correct. Needed to recreate it from scratch for some reason, then it showed up.

9
20 replies