SnaplogNavigatorObserver class

Tracks the current route so reports say which screen the user was on, and tells Insights about screen changes (for the user-flow view). Add it to your app: MaterialApp(navigatorObservers: [Snaplog.navigatorObserver]).

Inheritance

Constructors

SnaplogNavigatorObserver()

Properties

current ↔ String
getter/setter pair
currentScreen → String?
The screen on top now, if a page route has been seen.
no setter
hashCode → int
The hash code for this object.
no setterinherited
The navigator that the observer is observing, if any.
no setterinherited
onScreen ↔ void Function(String screen, String nav)?
Called with the screen's name and how the user got there: 'initial', 'push', 'pop' (went back) or 'replace'. Only full-screen page routes count, not dialogs or bottom sheets.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

didChangeTop(Route topRoute, Route? previousTopRoute) → void
The top most route has changed.
inherited
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.
override
didReplace({Route? newRoute, Route? oldRoute}) → void
The Navigator replaced oldRoute with newRoute.
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
nameCurrent(String name) → void
Remembers name for the route on top (Snaplog.screen).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
screenName(Route? route) → String
The name given with Snaplog.screen(), the route's name, or "(unnamed)".
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited