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