Navigator routes Clear the stack of flutter

前端 未结 1 713
我在风中等你
我在风中等你 2021-02-11 14:07

In my app i have three screens login , verifyotp , generatepass. I know how to move from one page to other page eg: Navigator.pushNamed(context, \"/theNameOfThePage\");

相关标签:
1条回答
  • 2021-02-11 14:25

    Full clean of Navigator's history and navigate to new route:

    void _logout() {
       Navigator.pushNamedAndRemoveUntil(context, "/newRouteName", (r) => false);
    }
    
    0 讨论(0)
提交回复
热议问题