You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document ListView usage with the Column widget #18341
P2Important issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/f: scrollingViewports, list views, slivers, etc.found in release: 3.7Found to occur in 3.7found in release: 3.9Found to occur in 3.9frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team
I cannot use ListView or ListViewBuilder inside Column widget. No list item is shown until I remove Column wrapper. Is it supposed not to work in that way, or is it a bug?
Hmm... where to start. Well ListView really wants to be put in an expanded widget right?
The implementation would be to put a search bar above it and perhaps some buttons below it.
Can you please make it a self-contained runnable example,
so that we just can copy it into lib/main.dart of a new project created with flutter create foo and reproduce?
ListView simply wants to be put in an Expanded widget that has a parent of type flex.
I don't necessarily think that's intuitive, but that's how it works.
Reacted by Mahamat Ali Youssouf , jelanijohn and Riandy Rahman Nugraha
I/flutter ( 7377): ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
I/flutter ( 7377): The following assertion was thrown during performResize():
I/flutter ( 7377): Vertical viewport was given unbounded height.
I/flutter ( 7377): Viewports expand in the scrolling direction to fill their container.In this case, a vertical
I/flutter ( 7377): viewport was given an unlimited amount of vertical space in which to expand. This situation
I/flutter ( 7377): typically happens when a scrollable widget is nested inside another scrollable widget.
I/flutter ( 7377): If this widget is always nested in a scrollable widget there is no need to use a viewport because
I/flutter ( 7377): there will always be enough vertical space for the children. In this case, consider using a Column
I/flutter ( 7377): instead. Otherwise, consider using the "shrinkWrap" property (or a ShrinkWrappingViewport) to size
I/flutter ( 7377): the height of the viewport to the sum of the heights of its children.
It is not that ListView wants to be in an Expanded, it's that it needs to know the available height and inside a ColumnExpanded provides that. You can also use another widget that limits the height in some way, it doesn't have to be Expanded.
I think this is working as intended.
Feel free to add a comment to have the issue reopened if you disagree.
Reacted by Gregory, Arjun Lalwani and Mahesh Jamdade
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 -v and a minimal reproduction of the issue.
P2Important issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/f: scrollingViewports, list views, slivers, etc.found in release: 3.7Found to occur in 3.7found in release: 3.9Found to occur in 3.9frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team
Activity
xster commentedon Jun 11, 2018
The error message should explain why it wouldn't work conceptually. Could you elaborate on your expected outcome?
elnurvl commentedon Jun 12, 2018
@xster There is no any error message. Just an empty view.
zoechi commentedon Aug 27, 2018
Can you please provide a running example (main.dart) that allows to reproduce?
JosephDunivan commentedon Dec 6, 2018
Im having this issue too.
zoechi commentedon Dec 6, 2018
@JosephDunivan would you mind providing a minimal example,
error output, expected behavior?
JosephDunivan commentedon Dec 6, 2018
Hmm... where to start. Well ListView really wants to be put in an expanded widget right?
The implementation would be to put a search bar above it and perhaps some buttons below it.
What I expected to be able to do
Instead I think you need to use an expanded widget.
JosephDunivan commentedon Dec 6, 2018
@elnurvl Can you see if wrapping your
ListViewin andExpandedwith a parent of typeflex(ie like a column widget) resolves your issue?zoechi commentedon Dec 6, 2018
Can you please make it a self-contained runnable example,
so that we just can copy it into
lib/main.dartof a new project created withflutter create fooand reproduce?JosephDunivan commentedon Dec 6, 2018
You could just place that code right after
body:JosephDunivan commentedon Dec 6, 2018
ListViewsimply wants to be put in anExpandedwidget that has a parent of typeflex.I don't necessarily think that's intuitive, but that's how it works.
zoechi commentedon Dec 19, 2018
It is not that
ListViewwants to be in anExpanded, it's that it needs to know the available height and inside aColumnExpandedprovides that. You can also use another widget that limits the height in some way, it doesn't have to beExpanded.I think this is working as intended.
Feel free to add a comment to have the issue reopened if you disagree.
29 remaining items
exaby73 commentedon Mar 17, 2023
Since https://api.flutter.dev/flutter/widgets/ListView-class.html does not contain any docs that explain this behavior of ListView, I'll update the labels
Document using a ListView inside a Column (flutter#195145)
github-actions commentedon Nov 28, 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.