StudioRouteObserver class
Observes all navigation events in the Studio router and syncs the
DeskViewModel signals (selectedDocumentId, currentDocumentTypeSlug, etc.)
from StudioRouter.topRoute.params.
Uses NavigationHistory.addListener as the primary mechanism because
Flutter's declarative Navigator.pages API does NOT fire didPush/didReplace
for same-route-type navigations where only path params differ (e.g.
/:documentTypeSlug = tip-screen → login-screen). navigationHistory fires
on every URL state change, including param-only changes.
The NavigatorObserver overrides are kept as a secondary mechanism for cross-type navigations (harmless redundancy).
- Inheritance
-
- Object
- NavigatorObserver
- StudioRouteObserver
Constructors
- StudioRouteObserver(StudioRouter router)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
The navigator that the observer is observing, if any.
no setterinherited
- router → StudioRouter
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
didChangeTabRoute(
TabPageRoute route, TabPageRoute previousRoute) → void - called when tab route reactivates
-
didChangeTop(
Route topRoute, Route? previousTopRoute) → void -
The top most route has changed.
inherited
-
didInitTabRoute(
TabPageRoute route, TabPageRoute? previousRoute) → void - called when a tab route activates
-
didPop(
Route route, Route? previousRoute) → void -
The Navigator popped
route.override -
didPush(
Route route, Route? previousRoute) → void -
The Navigator pushed
route.override -
didRemove(
Route route, Route? previousRoute) → void -
The Navigator removed
route.inherited -
didReplace(
{Route? newRoute, Route? oldRoute}) → void -
The Navigator replaced
oldRoutewithnewRoute.override -
didStartUserGesture(
Route route, Route? previousRoute) → void -
The Navigator's routes are being moved by a user gesture.
inherited
-
didStopUserGesture(
) → void -
User gesture is no longer controlling the Navigator.
inherited
-
dispose(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited