渲染溢出问题
来源:6-7 卡片组件封装与优化

AKIRA晓
2023-12-06
我这里模拟器用 iphone14 pro报一个渲染错误
A RenderFlex overflowed by 23 pixels on the right.
The relevant error-causing widget was:
Row Row:file:///Users/mac/Desktop/screenas/lib/widget/video_card.dart:64:22
The overflowing RenderFlex has an orientation of Axis.horizontal.
The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
但是我这边64行只是一个row
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_iconText(Icons.ondemand_video,videoModel.view),
_iconText(Icons.favorite_border,videoModel.favorite),
_iconText(null,videoModel.duration),
],
),
不知道问题出在哪里
padding和height都和源码一样
1回答
-
AKIRA晓
提问者
2023-12-06
感觉好像是fadeimage 的高度过低引起的 我调试到了160的高度发现不会报错了
FadeInImage.memoryNetwork(
height: 160,
placeholder: kTransparentImage,
image: videoModel.cover,
fit: BoxFit.cover,),022023-12-07
相似问题