There could be a few different reasons for this issue. Here are some possible solutions:
Check your navigation routes: Make sure that your app's navigation routes are set up correctly and that the back button is navigating to the correct screen. If you're not sure how to do this, check out the Flutter Navigator documentation for more information.
Use Navigator.pop() instead of Navigator.push(): If you're using Navigator.push() to navigate between screens, try using Navigator.pop() instead when you need to go back. This should take you back to the previous screen instead of the login page.
Check your authentication status: If you're being redirected to the login page, it's possible that your authentication status is not being properly saved or checked. Make sure that your app is properly checking if the user is already logged in before showing the login page.
Use a custom back button: If all else fails, you could try implementing a custom back button in your app instead of using the default one. This would give you more control over the navigation behavior and should help you avoid any unexpected redirection issues.
Asked: 2023-06-20 20:24:39 +0000
Seen: 8 times
Last updated: Jun 20 '23