reevaluate method
Implementation
@override
void reevaluate(AutoRedirectGuardBase guard, StackRouter router) {
final stackData = router.stackData;
final routesToRemove =
List<RouteMatch>.unmodifiable(stackData.map((e) => e._match));
for (final route in routesToRemove) {
router._removeRoute(route, notify: false);
}
final routesToPush = <RouteMatch>[];
for (final existingMatch in stackData.map((e) => e.route)) {
final routeToPush = router.matcher.matchByRoute(
existingMatch.toPageRouteInfo(),
);
if (routeToPush != null) {
routesToPush.add(routeToPush);
}
}
router._pushAllGuarded(routesToPush);
}