i use
Navigator.push(context, MaterialPageRoute(builder: (context) => B()));
to push from A to B to C to D i need to pop back from D to B i also need to remove D and C form stack i used
Navigator.popUntil(context, (route) => route is B);
but it gives me a blank screen it works only with initial route, sloutions i found is to use
Navigator.pop();
twice
is there any alternative solutions?
You can set route name.
When you call
popUntilset parameter using this name.