The following tree structure is causing a RenderFlex
error, apparently due to the last Column > Expanded > Scrollbar > ListView
:
I tried wrapping the Row
in the last Column
with Expanded
, but I still got the same error.
How can I fix this error without explicitly constraining the ListView
with a fixed height?
2
Answers
I often got same issues, i play with containers and columns to resolves my issues. Maybe try to change to :
Row > Expanded > Column > Expanded > Container (with full width) or Row or Column > Scrollbar > ListView
This issue is due to your List view. If you are using
Listview.builder then please make sure you use shrinkWrap property
and value of that property is true. Because Listview is not knowing
how much space is allocated. If this solution is not work then add
one more propery physics and make it NeverScrollPhysics as well
remove Scrollbar widget.
Otherwise Wrap Listview with Expanded and remove Scrollbar. As well give
physics to NeverScroll Physics which will also solved your issue.
Above two solution is solve your issue but still you facing the same issue then you need to provide code for that on which line you have issue.