I would like to know why I can not see the ListView content if I put it in Row that is inside Column?
Thank you
body: Center(
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Flexible(
child: ListView(
children: [
Text('Text 1'),
Text('Text 2'),
],
),
),
],
),
],
),
),
I did put the ListView inside Flexible but it is not working.
2
Answers
If you run your code, you will see this error:
Which means that the height isn’t constrained.
You should set
shrinkWrap
:to
true
:You can wrap the
ListView
withExpanded
widget, it will take available space.Check more about Unbounded height / width | Decoding Flutter