i am trying to find out why there is a big space or gab between those two flutter cards. i know there is something wrong here with the code. i checked out other posts on stackoverflow but nothing i have found could help me out, any help please. thanks
here is my code down below..
Container(
child: GridView.builder(
padding: EdgeInsets.zero,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 1,
),
shrinkWrap: true,
physics: ScrollPhysics(),
itemCount: promoList.length,
itemBuilder: (BuildContext context, int index) =>
PromotionCard(promotion: promoList[index]),
),
)
@override
Widget build(BuildContext context) {
return Column(
children: [
Card(
margin: EdgeInsets.all(0.0),
elevation: 2.0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8.0),
topRight: Radius.circular(8.0),
),
child: Image.asset(
promotion.imageUrl,
fit: BoxFit.cover,
width: MediaQuery.of(context).size.width,
),
),
Padding(
padding: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 20.0),
child: Text(
promotion.title,
style: TextStyle(
fontSize: 16.0,
fontFamily: 'BuffetRegular',
),
),
),
],
),
),
],
);
}
question from:
https://stackoverflow.com/questions/65941988/space-between-flutter-cards 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…