How can i do push replacement using go router plugin in flutter [go router]
123
Try this
Router.neglect(context, () {
context
.goNamed('third', params: {"id": ID});
});
It will neglect your current page. Hop this will helps you
Author by
Chirag Mevada
Updated on December 12, 2022Comments
-
Chirag Mevada over 1 year
I am using the go router plugin for my flutter web application, but I didn't find any way to do push replacement in navigation.
not only push replacement, can we do any other type of navigation link
- pushNamedAndRemoveUntil
- popUntil because these navigation options must be needed in kind of any system!
What I tried
- context.go(userStorage.redirectURL!);
- GoRouter.of(context).go(PagesCollection.adminDashboard);
they only pushed the next page, not replacing
Note: I want this functionality in go router