RouteObserverService.nested constructor

RouteObserverService.nested()

A fresh observer for a nested Navigator.

Returns a new instance on every call, so hold it in a State field rather than calling this from build — never reuse one across two Navigators (see the class doc).

An instance recreated on rebuild does not lose screen.name: the coordinator keys its per-navigator state on the live NavigatorState and rebinds to whichever observer reports next. That is a safety net, not the intended usage.

Implementation

factory RouteObserverService.nested() {
  return RouteObserverService._internal();
}