我正在制作一款Flutter 翼应用程序,我在两个地方使用了相同的图像.第一个是 carousel ,第二个是全尺寸集装箱. carousel 中的图像正在被剪切,我想将其稍微向右移动,这样它就不会从文本区被剪切.
目前它看起来是这样的
我希望确保包含文本的框不会被裁剪.
下面是供参考的图片
这是我正在使用的代码
child: Card(
elevation: 4,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
margin: const EdgeInsets.all(24),
child: ClipRRect(
borderRadius: BorderRadius.circular(
12.0),
child: Image.asset(
imageName,
fit: BoxFit.cover,
width: double.infinity,
height: double.infinity,
),
),
),