How to get full size of a ScrollController in Flutter?

Posted by Andre Scott | Updated on

Want to get full size of a ScrollController in Flutter? You can use _scrollController.position.maxScrollExtent to scroll to the end. Make sure to do this in a post-frame callback so that it will include the new item you just added.

Here is an example of a sliver list that scrolls to the end as more items are added.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers