child: Scaffold(
body: SingleChildScrollView(
child: Column(
children: [
_cardList(context),
Column(
children: [
Expanded(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: 3,
itemBuilder: (context, index) {
return Card(
child: Image.asset('assets/images/horizontal.jpg'),
);
},
),
)
],
),
I created a list and added 3 images under each other. But I can’t scroll down. I thought because I did Column in Column. But nothing changed when I deleted the Bottom Column.
2
Answers
Wrap your
ListView
withExpanded
for better performance, instead of usingshrinkWrap: true
you need to disable
SingleChildScrollView
scroll physic like this:both list are scroll vertically you need disable one of them which is
SingleChildScrollView
.