I want my screen to be scrollable so I put everything in a Listview.
Now I want to show another Listview inside to show details of a List. When I try this an error is thrown - " Expanded widgets must be placed inside Flex widgets."
You can wrap your ListView widget inside the Expanded widget and this will allow the ListView to take all the available as long as the Column allows.
To create nested list we use the List. filled( ) or List. generate( ) constructors. 2D, 3D, 4D Lists are an example of a nested array.
separated. In Flutter, you can use ListView. separated to easily create a list view whose items are separated by separators (or dividers). A separator only appears between two list items and never stands before the first or sits after the last item.
Add shrinkWrap: true
in listView.builder
& Remove the top most Container
or replace it with Column
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With