gpt4 book ai didi

dart - 我如何在 flutter 中增加 bottomAppbar 的高度

转载 作者:IT王子 更新时间:2023-10-29 07:21:54 33 4
gpt4 key购买 nike

我的应用程序中有一个 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,
),

最佳答案

我通过在行中的图标中间添加一个容器小部件来解决这个问题。对我来说应该有更好的方法,但如果有人可以建议那会很好下面是我如何解决的

  bottomNavigationBar: BottomAppBar(
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[

Icon(Icons.category, color: HexColor('#00A591'),),
Icon(Icons.account_circle,color: HexColor('#00A591'),),
Container(height: 55.0,width: 1.0,),
Icon(Icons.message, color: HexColor('#00A591'),),
Icon(Icons.access_alarm, color: HexColor('#00A591'),),

],
),
shape: CircularNotchedRectangle(),
color: Colors.white,
notchMargin: 8.0,
),

关于dart - 我如何在 flutter 中增加 bottomAppbar 的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55204703/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com