【发布时间】:2021-05-20 07:18:34
【问题描述】:
在我的应用程序中,我有一个bottomBar,它位于SafeArea 上方的右下角:
问题是我想在底部有一个白色的Container(图像中的红色箭头),这样对于更大的 iPhone(屏幕底部 不等于 safeArea) 图片中的空白处,如果填充为白色。
对于底部屏幕等于与safeArea 相同的手机,fillContainerHeight 应该简单地为零/零。
这是我的设置:
Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
// mainAxisSize: MainAxisSize.max,
children: [
SafeArea(
child: Row(
children: [
Expanded(
child: Container(
height: 49,
color: Colors.white,
)),
Container(
height: 49,
child: Image.asset('assets/images/bottomBar.png')),
Expanded(
child: Container(
height: 49,
color: Colors.white,
)),
],
),
),
Container(color: Colors.white) // -> fill container
],
)
目前容器未显示。在这里解决我的问题的最佳方法是什么?我在这方面找不到任何东西。如果您需要更多信息,请告诉我!
【问题讨论】:
标签: flutter dart widget containers flutter-layout