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.
If you do not use named routes, you can use
Navigator.of(context).popUntil((route) => route.isFirst);