我在我的应用程序中有一个BottomAppBar,但高度似乎只是包围了其中的图标。我想给予bottomAppBar一些更高的高度,我该如何实现这一点?
bottomNavigationBar: BottomAppBar(
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Icon(Icons.category),
Icon(Icons.account_circle),
Icon(Icons.message),
Icon(Icons.access_alarm)
],
),
elevation: 9.0,
shape: CircularNotchedRectangle(),
color: Colors.white,
notchMargin: 8.0,
),
4条答案
按热度按时间h43kikqp1#
我通过在图标中间添加一个容器小部件来解决这个问题。对我来说应该有一个更好的方法,如果有人能建议的话,下面是我解决这个问题的方法
b4wnujal2#
您可以为图标添加填充:
另一种解决方案:Im使用
BottomNavigatorBar
并且它具有属性iconSize
3wabscal3#
实际上,您可以通过指定高度来尝试使用Container Package Row小部件。
2izufjch4#
SizedBox
对我很有效。`