【发布时间】:2021-09-23 04:18:21
【问题描述】:
如何创建文本必须从上到下的图像横幅并且不与图像重叠?
如果我使用大屏幕正常,但不是像这张图片这样的小屏幕
这是我的颤振代码
return SingleChildScrollView(
child: Column(
children: [
SizedBox(
height: constraints.biggest.height,
child: Stack(
children: [
Positioned(
top: 0,
height: BannerHeight,
left: 0,
right: 0,
child: Image(
image: AssetImage("asset/images/banner.jpg"),
fit: BoxFit.fill,
)
),
Positioned(
top: BannerHeight - BannerHeight / 4,
height: 100,
left: Left,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Nominal",
style: TextStyle(color: Colors.white)),
Text("Rp. 1.000.000.000",
style: TextStyle(color: Colors.white)),
Text("Point 10.538",
style: TextStyle(color: Colors.white))
]
)
),
],
),
),
],
),
);
我需要什么
【问题讨论】:
-
你说的top of bottom other layer是什么意思?
-
像 xml 中的约束布局与属性
app:layout_constraintTop_toBottomOf=""
标签: flutter