我是一个Flutter 的初学者,在测试了许多解决方案后,我被阻止了. 我想删除我的边界容器和他的子元素图像之间的空间.两者都有边界半径. 下面,我的代码片段结束了图像. 谢谢你的宝贵帮助.
Container(
height: 100,
width: double.infinity * screenWidthRatio,
margin: const EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 20.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
border: Border.all(color: blueColor, width: 3),
gradient: const LinearGradient(
begin: Alignment.centerRight,
end: Alignment.centerLeft,
colors: [
Colors.black,
Colors.black87,
Colors.black54,
Colors.transparent,
],
),
),
child: Row(
children: [
ClipRRect(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(20),
bottomLeft: Radius.circular(20)),
child: Image.network(
'https://img.lemde.fr/2022/02/06/0/0/0/0/580/0/75/0/a8d87fe_5475999-01-06.jpg',
),
),
// Future column
],
),
)
下面是这个例子