Helper to pop all routes until route with name is found see popUntil
name
void popUntilRouteWithName(String name, {bool scoped = true}) { popUntil(ModalRoute.withName(name), scoped: scoped); }