底部导航栏位于键盘顶部

问题描述 投票:7回答:1

似乎是Flutter的最新更新改变了BottomNavigationBar的行为。以前,当键盘出现时,键盘将覆盖BottomNavigationBar。但是,现在,BottomNavigationBar出现并始终显示在键盘顶部时。

当键盘出现时,如何将BottomNavigationBar设置为保留在键盘下方?

  bottomNavigationBar: new BottomNavigationBar(
      type: BottomNavigationBarType.fixed,
      fixedColor: Colors.blue,
      onTap: _navigationTapped,
      currentIndex: _pageIndex,
      items: [
        new BottomNavigationBarItem(icon: new Icon(Icons.apps), title: new Text("Manage")),
        new BottomNavigationBarItem(icon: new Icon(Icons.multiline_chart), title: new Text("A")),
        new BottomNavigationBarItem(icon: new Icon(Icons.check_box), title: new Text("B")),
        new BottomNavigationBarItem(icon: new Icon(Icons.person_add), title: new Text("C")),
        new BottomNavigationBarItem(icon: new Icon(Icons.border_color), title: new Text("D")),
      ]
  ),
flutter flutter-layout
1个回答
0
投票

您的脚手架中是否有resizeToAvoidBottomInset: false?当键盘出现时,这会使bottomBar上升]

© www.soinside.com 2019 - 2024. All rights reserved.