ListView.builder problems

Hi,
created a ListView.builder.
My problem is that it doesn’t work when it’s in a column.
I get the message: RenderBox was not laid out: RenderDecoratedBox # eb3c6 relayoutBoundary = up6

I uploaded my code to Pastebin.
Maybe someone can help me.
https://pastebin.com/nKQ6j4mT

Please wrap the the ListView inside a container and give it a height.

List View doesn’t have a height as it is Scrollable but when you put it inside a column(not scrollable) it throws an error. Hence you need to wrap it in another widget and give it a fixed height.

Something as follows:
Container(height: MediaQuery.of(context).size.height*0.80, child: DisplayListView())

Thanks :+1:

but is it normal to get an overflow?
Now I solved it like this:
Container(
height: MediaQuery.of(context).size.height - 110,
child: DisplayListView(),
)

1 Like

Yes it is normal to get an overflow when you render a listview inside a Column.

Mam can u please solve myissue(List View builder problem)

Expanded Widget can also be helpful.

1 Like