ZenRouteObserver class
Navigator observer that automatically disposes controllers when routes are popped and allows for custom route change callbacks
- Inheritance
-
- Object
- NavigatorObserver
- ZenRouteObserver
Constructors
- ZenRouteObserver.new({void onRouteChanged(Route? route, Route? previousRoute)?})
- Creates a ZenRouteObserver
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
The navigator that the observer is observing, if any.
no setterinherited
- onRouteChanged → void Function(Route? route, Route? previousRoute)?
-
Callback for when routes change
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearAllRoutes(
) → void - Clear all route registrations
-
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
withnewRoute
.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
-
getDebugInfo(
) → Map< String, dynamic> - Get debug information about registered routes
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerForRoute(
String routeName, List< Type> controllerTypes, {ZenScope? scope}) → void - Register controllers for a specific route
-
registerTaggedForRoute(
String routeName, List< String> controllerTags, {ZenScope? scope}) → void - Register tagged controllers for a specific route
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited