How to use BottomNavigationBar with Navigator?

后端 未结 6 789
北荒
北荒 2020-12-02 08:36

The Flutter Gallery example of BottomNavigationBar uses a Stack of FadeTransitions in the body of the Scaffold.

I

6条回答
  •  臣服心动
    2020-12-02 09:02

    Navigator.of(context).pushNamedAndRemoveUntil(
                    routes[value], (route) => true);
    

    I had to use true to enable back button.

    NB: I was using Navigator.pushNamed() for navigation.

提交回复
热议问题