What are the differences between SliverList
and ListView
in Flutter?

- 237,138
- 77
- 654
- 440

- 3,324
- 4
- 20
- 28
-
7That question is totally legit. – Rémi Rousselet May 16 '18 at 09:57
-
Yes, I have read the documentation. But didn't find any differences. That is why I asked about it. – Rafiqul Hasan May 16 '18 at 10:15
-
@RafiqulHasan I am pretty sure @Adriaan will tell you that you havent`t looked thoroughly enough...:P – Pascal Jan 19 '20 at 20:52
-
@Pascal This question was asked in 16 may, 2018. In that time flutter was in alpha stage. There was not much of documentation or article to find. – Rafiqul Hasan Jan 20 '20 at 06:28
2 Answers
There's almost no difference.
ListView
is a SliverList
. Same with GridView
, which is a SliverGrid
.
They are doing exactly the same thing. The only difference between them is that SliverList
is a sliver, not a widget. Which means it's used inside a ScrollView
, usually CustomScrollView
.
ListView
is nothing else but a biding of SliverList
to transform it into a Widget
to make it usable alongside other widgets such as Row
/Container
.
Most of the time, use ListView
.
But if you want advanced scroll behavior such as appbar animations with scroll ; you'll need to use a CustomScrollView
. Which will force you to use SliverList
instead of ListView
.

- 256,336
- 79
- 519
- 432
-
1with `SliverList` it's possible to use `SliverToBoxAdapter`, is there any equivalent for `ListView` which is not inside a sliver list ? – Pars Feb 11 '19 at 15:10
According this article,
All of the scrollable views you use, like
ListView
andGridView
, areactually implemented using Slivers
. You can kind of think of Slivers as a lower-level interface, providing finer-grained control on implementing scrollable area. Because slivers can lazily build each item just as it scrolls into view, slivers are particularly useful for efficiently scrolling through large numbers of children.

- 4,037
- 3
- 30
- 58