subscribe method
Subscribe AutoRouteAware to be informed about changes to route
.
Going forward, AutoRouteAware will be informed about qualifying changes
to route
, e.g. when route
is covered by another route or when route
is popped off the Navigator stack.
Implementation
void subscribe(AutoRouteAware routeAware, RouteData route) {
final Set<AutoRouteAware> subscribers =
_listeners.putIfAbsent(route.key, () => <AutoRouteAware>{});
if (subscribers.add(routeAware)) {
if (route.router is TabsRouter) {
routeAware.didInitTabRoute(null);
} else {
routeAware.didPush();
}
}
}