Flutter - Listview.builder set initial offset to last position or pixel?

Viewed 939

this is definitely similar to Flutter - ListView.builder: Initial scroll position but it seems there is no solution to it.

I know I can set the initial offset to a double, but what I want is the controller.position.maxScrollExtent.

this is for a chat page, how can WhatsApp and other apps so it so easy while we have to do workarounds for this simple thing?

This will not work > _chatScrollController = ScrollController(initialScrollOffset: _chatScrollController.position.maxScrollExtent); because the controller just initialized and it doesn't know the max offset yet. So what I ended up having to do, was to use animateTo after the chat was rebuilt. But I don't like this much. Is there a better way?

0 Answers
Related