新来的颤动并试图重新创建一个网站,但无法弄清楚如何在我的卡片上放置文本并在文本后面包含全宽不透明度。我还尝试在卡片上添加圆角,但我注意到仍然有白色的尖角。任何建议将不胜感激!。
Card(
elevation: 5,
child: Container(
height: 300,
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15.0),
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(urlImage),
colorFilter: ColorFilter.mode(
Colors.black.withOpacity(0.1), BlendMode.softLight),
)),
child: Padding(
padding: const EdgeInsets.all(10.0),
child: Expanded(
child: Align(
alignment: Alignment.bottomCenter,
child: Text(
title,
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 24,
backgroundColor: Colors.black.withOpacity(0.6),
),
),
),
),
),
),
margin: EdgeInsets.only(left: 10.0, right: 10.0, top: 5.0),
);