我使用 custom_navigator 插件。一切正常,但是当我在BottomNavigationBar中使用currentIndex时出现问题,则它不起作用。
CustomScaffold(
scaffold: Scaffold(
bottomNavigationBar: BottomNavigationBar(
items: _items,
onTap: (index) {
navigatorKey.currentState.maybePop();
setState(() {
_currentIndex = index;
});
},
currentIndex: _currentIndex,
),
),
children: <Widget>[
HomeMenu(),
SettingMenu(),
NotificationMenu(),
HelpMenu()
],
),