I am currently using the auto_route package (version ^9.2.0) in my Flutter project, and I am encountering a problem with nested navigation. Specifically, I am having issues with the replace and replaceAll methods in the context of child routers.
Issue: After completing the flow through all the child routes, I want to navigate to the TargetPage and prevent navigation back to the previous screens when pressing the back button. However, the replace and replaceAll functions do not seem to work as expected in this scenario. I have also tried using other functions such as popUntil(), as mentioned in the package documentation, but this did not resolve the issue. I am using GetIt it for dependency injection, and the problem persists despite these attempts.
I am currently using the auto_route package (version ^9.2.0) in my Flutter project, and I am encountering a problem with nested navigation. Specifically, I am having issues with the replace and replaceAll methods in the context of child routers.
Here’s a brief overview of the setup and issue:
Issue: After completing the flow through all the child routes, I want to navigate to the TargetPage and prevent navigation back to the previous screens when pressing the back button. However, the replace and replaceAll functions do not seem to work as expected in this scenario. I have also tried using other functions such as popUntil(), as mentioned in the package documentation, but this did not resolve the issue. I am using GetIt it for dependency injection, and the problem persists despite these attempts.