gpt4 book ai didi

flutter - Flutter Youtube风格图像黑色叠加

转载 作者:行者123 更新时间:2023-12-03 04:13:50 24 4
gpt4 key购买 nike

如何在 flutter 中达到这种效果?

flutter overlay image

最佳答案

这会工作

Container(
height: 200,
child: Stack(
children: [
Image.network(
'https://cdn.motor1.com/images/mgl/rBzVX/s1/most-expensive-cars.jpg',
fit: BoxFit.cover,
),
Container(
height: 200,
width: double.infinity,
color: Colors.black54,
),
Align(
alignment: Alignment.centerRight,
child: Container(
height: 200,
width: 100,
color: Colors.black,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'50+',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16),
),
SizedBox(
height: 8,
),
Icon(
Icons.play_circle_outline,
color: Colors.white,
size: 30,
)
],
),
),
),
Align(
alignment: Alignment.center,
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.play_arrow,
color: Colors.white,
size: 30,
),
Text(
'PLAY ALL',
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 16),
)
],
),
),
],
),

关于flutter - Flutter Youtube风格图像黑色叠加,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62307485/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com