Flutter has many built-in widgets that automatically scroll and also offers a variety of widgets that you can customize to create specific scrolling behavior.
Many Flutter widgets support scrolling out of the box
and do most of the work for you. For example,
SingleChildScrollView automatically scrolls its
child when necessary. Other useful widgets include
You can check out more of these widgets on the
scrolling page of the Widget catalog.
When you have a long list of items
GridView (including an infinite list),
you can build the items on demand
as they scroll into view. This provides a much
more performant scrolling experience.
For more information, check out
Specialized scrollable widgets
The following widgets provide more specific scrolling behavior.
A video on using
Turn the scrollable area into a wheel!
Perhaps you want to implement elastic scrolling, also called scroll bouncing. Or maybe you want to implement other dynamic scrolling effects, like parallax scrolling. Or perhaps you want a scrolling header with very specific behavior, such as shrinking or disappearing.
You can achieve all this and more using the
A sliver refers to a piece of the scrollable area.
You can define and insert a sliver into a
to have finer-grained control over that area.
Nested scrolling widgets
How do you nest a scrolling widget
inside another scrolling widget
without hurting scrolling performance?
Do you set the
ShrinkWrap property to true,
or do you use a sliver?
Check out the “ShrinkWrap vs Slivers” video: