【发布时间】:2019-03-06 15:36:47
【问题描述】:
我在 materialApp 中添加了一个BottomAppBar 来脚手架,并且我在中心添加了一个带有插图的晶圆厂。代码看起来有点像这样
Scaffold(
bottomNavigationBar: BottomAppBar(
color: Theme.of(context).accentColor,
shape: CircularNotchedRectangle(),
child: _buildBottomBar(context),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
floatingActionButton: FloatingActionButton(
backgroundColor: Theme.of(context).primaryColor,
child: Center(
child: Icon(
Icons.add,
size: 32.0,
),
),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => CreateEvent()),
);
},
),
)
这就是我在渲染后得到的:
缺口不透明,后面的内容被隐藏了。
有没有办法解决这个问题?我可能错过了什么?
【问题讨论】:
-
您的“内容落后”是否指定为
Scaffold的body参数? -
是的,body 包含所有内容,基本上是图像和文本的列表视图。
-
我建议改为提出问题。这似乎是一个布局问题,身体没有在底部栏后面。
-
哦,太糟糕了。以为我做错了什么。
-
@RémiRousselet 原来有一个未解决的问题 -> github.com/flutter/flutter/issues/17555
标签: flutter