似乎是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")),
]
),
您的脚手架中是否有resizeToAvoidBottomInset: false
?当键盘出现时,这会使bottomBar上升]