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
What I tried
they only pushed the next page, not replacing
Note: I want this functionality in go router
In the latest go_router, You can use
context.pushReplacement('/login');void pushReplacement(
String location,
{Object? extra}
)
context.pushReplacementName(Routes.login)
(Routes is a class having defination of login)void pushReplacementNamed(
String name,
{Map<String, String> params = const <String, String>{},
Map<String, dynamic> queryParams = const <String, dynamic>{},
Object? extra}
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With