【发布时间】:2022-08-17 18:44:53
【问题描述】:
我想要的设计:
我目前的设计:
如何去除白色背景,只显示图像。有人知道吗?
我的代码:
new Column(
mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Stack(
children: [
new Card(
child: new Container(
child: new Image.asset(
\'assets/images/front_Page_Image.png\',
height: 746,
width: constraints.maxWidth * 0.64,
fit: BoxFit.cover,
),
),
),
new Card(
child: new Container(
alignment: Alignment.topLeft,
child: new Image.asset(
\'assets/images/half_circle.png\'),
),
)
],
),
],
),
-
您的第二个图像资产是否具有白色背景?分享图片。
-
使用堆栈,将孩子放在堆栈中。设置背景图片,然后在上面设置一个不透明的圆圈,最后是文字!!