Closed akyjoe closed 4 years ago
Hey, there's a a replaceWith function for the one you made. There's also a clearStackAndShow which will clear the stack and show the view you want to navigate to. There's also clearTillFirstAndShow which will clear till the first view and then navigate to your view. You can see it all here in the stacked services readme.
Using MVVM architecture and stacked package, we are working on a basic User Login flow.
When user login successfully,
pushNamed
in the navigation service redirects user to home screen, but also allowing to navigate back to login screen. To fix that, we created another function in the navigation service withpushReplacementNamed
and it worked, as it not allows user to move back.But is there a way to use
pushAndRemoveUntil
without context? I tried navigating to your Youtube channel comment and found something below:But unable to replicate in the code. Are you saying to wrap the
WillPopScope
to the home screen?