【发布时间】:2021-08-14 18:03:53
【问题描述】:
无法将容器放入可滚动银色列表内的堆栈中。 我的代码是
SliverList(
delegate: SliverChildListDelegate([
Stack(
children: [
Container(
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.cover,
image: NetworkImage(
'https://idsb.tmgrup.com.tr/ly/uploads/images/2020/05/13/35552.jpeg'))),
height: createSize(347, context),
width: createSize(375, context),
),
Align(
alignment: Alignment.bottomCenter,
child: Container(
color: Colors.blue,
height: createSize(307, context),
),
),
],
)
])
【问题讨论】:
-
你为什么不使用“CustomScrollView”并使用 SliverAppBar 作为图像部分。喜欢这个实现youtube.com/watch?v=R9C5KMJKluE&t=20s
-
已经在coustomscrollview里面了。底部容器的位置没有改变