I am recursively adding routes to the navigator. There could be 20 views or more. Pop works as advertised, but I would like to pop to index 1 and remove all push history.
In case you know exactly how many pops should be performed:
For example for 2 pops:
count = 0; Navigator.popUntil(context, (route) { return count++ == 2; });