pushNamedAndRemoveUntil bug? it doesn't remove as expected

95 views
Skip to first unread message

wyx....@gmail.com

unread,
Jun 23, 2021, 2:25:02 PM6/23/21
to Flutter Development (flutter-dev)
I am using the below code to remove all and push a new page

     Navigator.pushNamedAndRemoveUntil(
        context,
        '/dashboard',
       (Route<dynamic> route) => false,
      );

I expect after the call, the stack only has one routine, that is the new pushed page '/dashboard'.

But I got two, the first route is the '/login'.

Any idea why the code doesn't remove all previous routes in the stack?

thanks


Reply all
Reply to author
Forward
0 new messages