popAndPushNamed<T extends Object, TO extends Object> method
Pop the current route off the navigator and navigate to a route.
Modular.to.popAndPushNamed('/home');
You could give parameters
Modular.to.popAndPushNamed('/home', arguments: 10);
Implementation
@override
Future<T?> popAndPushNamed<T extends Object, TO extends Object>(
String routeName,
{TO? result,
Object? arguments}) =>
navigator.popAndPushNamed(
routeName,
result: result,
arguments: arguments,
);