【发布时间】:2018-10-10 20:24:09
【问题描述】:
我已经被这个问题困扰了一段时间,并且无法通过谷歌搜索找到任何答案。我有一个带有 endDocked Fab 的 bottomAppBar,带有 3 个间隔开的图标。然而,这些图标并没有考虑到 FAB 就在它的正上方,这导致间距不太令人赏心悦目。
第一张照片显示当前正在发生的事情,第二张更接近我所追求的,减去隐藏在 FAB 后面的白色图标。
有没有办法告诉flutter说图标的可用空间不应该与endDocked FAB重叠?
谢谢!
代码:
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,
floatingActionButton: FloatingActionButton(
backgroundColor: Color(0xFF14172D),
child: const Icon(Icons.menu),
onPressed: () {},
),
bottomNavigationBar: BottomAppBar(
shape: CircularNotchedRectangle(),
notchMargin: 4.0,
child: new Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
IconButton(
icon: Icon(Icons.all_inclusive),
color: Color(0xFF14172D),
onPressed: () {},
),
IconButton(
icon: Icon(Icons.account_circle),
color: Color(0xFF14172D),
onPressed: () {},
),
IconButton(
icon: Icon(Icons.notifications),
color: Color(0xFF14172D),
onPressed: () {},
),
],
),
),
【问题讨论】: