In case of error, I want to redirect my users to the same flow again (in order to reset the flow state).
I'm using the auto_route package for navigation, and I can see that router.replace and router.replaceAll do not replace (remove and insert from the stack) the same routes again (it just updates them).
From the official documentation:
// removes last entry in stack and pushs provided route
// if last entry == provided route page will just be updated
router.replace(const BooksListRoute())
// This's like providing a completely new stack as it rebuilds the stack
// with the list of passed routes
// entires might just update if already exist
router.replaceAll([
LoginRoute()
]);
How can I "hard reset" replace a route, or stack of routes, using auto_route package?