> 一切正常,但当我更改产品名称时,它的底部像素溢出 :(;
class VerticalProductItemWidget extends StatelessWidget {
final ProductModel product;
const VerticalProductItemWidget({Key key, this.product}) :
super(key: key);
@override
Widget build(BuildContext context) {
final screenHeight = MediaQuery.of(context).size.height;
return GestureDetector(
这里我的卡片从一些装饰开始即使我改变图片大小,它也会被一些像素溢出。孩子:填充(填充:const EdgeInsets.all(8.0),
child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
color: Color(0xFFFCFCFC),
child: Container(
// padding: const EdgeInsets.all(10),
// color: productt.backgroundColor,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(top: 10.0),
child: Hero(
tag: product.imagepath.toString(),
child: FadeInImage.assetNetwork(
placeholder:
'assets/images/image_placeholder.png',
image: product.imagepath.toString(),
height: 100,
))),
Text(
product.productname,
style: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFF3B3B43),
fontSize: 16),
),
Divider(
height: 4,
indent: 10,
endIndent: 10,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'Rs: ',
style: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFF050405),
fontSize: 14),
),
Text(
product.saleprice.toString(),
style: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0xFF3B3B43),
fontSize: 14),
),
Text(
'.00',
style: TextStyle(
fontWeight: FontWeight.w400,
color: Color(0x703B3B43),
fontSize: 8),
),
],
),
],
),
),
elevation: 5,
),
),
[![enter image description here][1]][1] );
}
}
最终结果在这里作为屏幕图像。有没有人遇到同样的问题,求解答