我正在尝试将容器B堆叠在容器A上,就像下图中一样,但在我的情况下它不起作用,这一定是定位小部件时出错了。
My code:
body: Stack(
children: [
Column(
children: [
Container(
//this contains content of container A with a width of maxFinite and height of 300.
),
//here comes the 2nd container that i want to stack over first one like in picture.
Positioned(
top: 50,
bottom: 0,
left: 0,
right: 0,
child: Container(
width: double.maxFinite,
height: 500,
decoration: BoxDecoration(
color: Colors.yellow,
borderRadius: BorderRadius.only(topLeft: Radius.circular(25.0), topRight: Radius.circular(25.0)),
),
),
),
],
),
],
),
如果有人能指引我,谢谢。