After a user successfully logged in in my Flutter web app, it should be taken to a dashboard view.
The user then should not be able to navigate back to the login screen by pressing the browser back button.
I tried a lot of things, replacing the route, popping the route and then pushing the next route, all did not work.
Also using WillPopScope
in the dashboard page does not work. Pressing the browser back button does not fire onWillPop
.
Found some similar questions, but they all end up suggesting WillPopScope
or replacing the route, both did not work for me.
Any idea what I could do?