You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter BottomAppBar底部溢出问题求助,附完整实现代码

Flutter BottomAppBar底部溢出问题排查修复请求

在Flutter项目中使用BottomAppBar时遇到**底部溢出(bottom overflowed by)**问题,尝试多种方法均无法解决,现附上问题截图及完整的BottomAppBar实现代码,恳请协助排查修复。

BottomAppBar底部溢出问题

完整实现代码

bottomNavigationBar: BottomAppBar(
  color: Colors.grey[900],
  child: Padding(
    padding: const EdgeInsets.symmetric(horizontal: 10.0, vertical: 8.0),
    child: Container(
      height: 90, // 可根据需求调整此高度值
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
        children: <Widget>[
        IconButton(
          icon: Column(
            children: [
              Image.asset('assets/bomba.png', width: 50, height: 50), // 图标尺寸设置
              SizedBox(height: 1), // 图标与文字的间距
              Text(
                '$_jokerCount',
                style: TextStyle(fontSize: 10, color: Colors.white), // 文字样式
              ),
            ],
          ),
          onPressed: () {
            _eliminateTwoWrongChoices();
          },
        ),
        IconButton(
          icon: Image.asset('assets/doktor.png'),
          onPressed: () {
            _selectCorrectAnswer();
          },
        ),
        IconButton(
          icon: Image.asset('assets/süre.png'),
          onPressed: () {
            setState(() {
              _remainingTime += 15;
            });
          },
        ),

        IconButton(
          icon: Image.asset('assets/skip.png'),
          onPressed: () {
            Navigator.of(context).pop();
            Navigator.of(context).popUntil((route) => route.isFirst);
            Navigator.of(context).push(
              MaterialPageRoute(builder: (context) => SpinningWheel(jetonSayisi: widget.jetonSayisi, jetonAzalt: widget.jetonAzalt,) //The getter 'jetonAzalt' isn't defined for the type 'QuestionPage'.
              ),
            );
          },
        ),
      ],
    ),
  ),
),

内容的提问来源于stack exchange,提问作者IcarusFW

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.06 05:25:23