onAfter method

Future<void> onAfter(
  1. RouteContext context
)

Called after successful navigation to the route.

Use this for analytics, logging, or post-navigation setup.

Example:

@override
Future<void> onAfter(RouteContext context) async {
  Analytics.trackPageView(context.routeName);
}

Implementation

Future<void> onAfter(RouteContext context) async {}