introduction_screen
introduction_screen copied to clipboard
Global introKey is called from different pages (routes)
Good day, thank you for the amazing package, however I have a little problem.
I am putting buttons in my intro screen to navigate to different parts of the app, but when I am in one of those different parts, when I press back button, the Navigator goes to the page before the intro screen package is even used. my app is something like this:
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.................................................................................................................../--> random page 3 --> xxx
................................................................/--> intro screen page 1| --> random page --> favs
home --> introduction screen |--> intro screen page 2 --> random page 2 --> reviews
...............................................................--> intro screen page 3
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Now when I'm in page "favs" which is already 2 pages away from the intro screen, I navigate back to the "home". I am not using Navigator.pushReplacement
anywhere in the app, just Navigator.of(context){...}
Also, the Global key used for navigation between different pages of the introduction_screen gets called when I preses back while in "favs" or "reviews" page.
Thanks for your time, I'd appreciate any help!
Do this before your IntroductionScreen widget:
WillPopScope(
onWillPop: () async => false, // Block user from pressing back, disable back
child:
Hi @Sadoun-Jr
I'm presuming you found a solution and am closing this issue. Thanks for helping out @alymbouras
Many thanks, Gavin.