Home > Back-end >  Problem with navigation flow(home > target page ->login- > back to target -> home(proble
Problem with navigation flow(home > target page ->login- > back to target -> home(proble

Time:10-08

I've made a home page and a target page. When the a target page button is pushed on the home screen, I am checking if users are logged in and navigating them to a Login Page(Web). After successful Login, the page is redirecting back to a target Page. Here comes a problem. There is no way back to the Home Page.

Home -> Target Page -> Log-in(Web) -> back to Target Page(No histories left in navigator)

I am using Navigator.of(context).pushNamed(route)

No Appbar back button. physical device back button directs to go out from the app now. Any ideas would be helpful

CodePudding user response:

To help return to the previous screen

Navigator.of(context).pop()

Or read more about navigation in Flutter: Navigation and routing

CodePudding user response:

Use this

Navigator.of(context).pop()

or

check this

  • Related