您现在的位置是:首页 >学无止境 >flutter修改bottomnavigationbar高度网站首页学无止境

flutter修改bottomnavigationbar高度

为毛呀 2024-10-13 12:01:04
简介flutter修改bottomnavigationbar高度

bottomNavigationBar: SizedBox(height: 65, child:BottomNavigationBar(
          type: BottomNavigationBarType.fixed,
          currentIndex: currentIndex,
          selectedFontSize: 0.0,
          unselectedFontSize: 0.0,

          onTap: (int index) {
            setState(() {
              currentIndex = index;
              controller.animateToPage(currentIndex, duration: Duration(milliseconds: 100), curve: Curves.easeInOut);
            });
          },
          items:  [
            BottomNavigationBarItem(
              icon: Image.asset("images/tab_icon1_d.png", width: 30,),
            activeIcon: Image.asset("images/tab_icon1_s.png", width: 30),
            label: "",
            ),
            BottomNavigationBarItem(
              icon: Image.asset("images/tab_icon2_d.png", width: 30),
              activeIcon: Image.asset("images/tab_icon2_s.png", width: 30),
              label: "",
            ),
            BottomNavigationBarItem(
              icon: Image.asset("images/tab_icon3_d.png", width: 30),
              activeIcon: Image.asset("images/tab_icon3_s.png", width: 30),
              label: "",
            ),
          ],
        )),

风语者!平时喜欢研究各种技术,目前在从事后端开发工作,热爱生活、热爱工作。