Repository navigation
Description
Related: #130360
Developers are using shrinkWrap: true on their Lists/ SingleChildScrollView s when they run into vertical viewport was given unbounded height which is not performant. See the above issue about deprecating shrinkWrap. Also note that the first result on google for
vertical viewport was given unbounded height
recommends using shrinkWrap: true. I would add that the naming and documentation of CustomScrollView adds to this issue. New developers often try not to use CustomScrollView because of the word "custom" which implies that it is meant for advanced use cases. But really almost every app should be using CustomScrollView at some point. The subtitle in the documentation doesn't help much here:
A ScrollView that creates custom scroll effects using slivers.
It's true that you can create custom effects with CustomScrollView via eg. SliverAppBar but the main use case for most uses of this API don't actually care about custom scroll effects. So developers just add shrinkWrap: true to avoid CustomScrollView which sounds scarier. So we should at least change the documentation so that developers know they should be using CustomScrollView whenever they want a List to scroll along with another Widget be that a Text or another sliver and remove the "custom scroll effects" line from the subtitle.
Maybe something like
A ScrollView that allows arbitrary widgets to be scrolled together using slivers
would make it more clear when it should be used.
Perhaps another issue should be filed about potentially renaming CustomScrollView. (I think MultiChildScrollView or MultiSliverScrollView might work)
Activity
goderbauer commentedon Feb 6, 2024
Feel free to submit a PR to make these improvements!
Clarify CustomScrollView use cases (flutter#189692)
github-actions commentedon Aug 12, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.