getting " 'hasSize': RenderBox was not laid out:" . wraping listview builder with expanded doesn't work. how to fix it? . Wraping the listview with a sized box works. but The Ui requirement is the card needs to expand with the number of list in the listview builder
Card(
elevation: 5,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"xyz",
),
),
Expanded(
child: ListView.builder(
itemCount: ,
itemBuilder: (context, index) {
return GestureDetector(
onTap: () =>()
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Divider(),
Text(),
Text(
),
)
],
),
);
},
),
),
],
),
),
),
````
Example