replaceAll method
Future<void>
replaceAll(
- List<
PageRouteInfo< routes, {Object?> > - OnNavigationFailure? onFailure,
- bool updateExistingRoutes = true,
Remove the whole current pages stack and push all given routes
if onFailure callback is provided, navigation errors will be passed to it
otherwise they'll be thrown
if updateExistingRoutes is set to false a fresh stack
will be initiated.
Implementation
Future<void> replaceAll(
List<PageRouteInfo> routes, {
OnNavigationFailure? onFailure,
bool updateExistingRoutes = true,
}) {
return _findStackScope(routes.first)._replaceAll(
routes,
onFailure: onFailure,
updateExistingRoutes: updateExistingRoutes,
);
}