Follow the user's path through your app

Preserve named Flutter screen visits so you can reconstruct a session's navigation and place app evidence in context.

Screen-view events show the route a user took before an issue appeared. Add them to your session manually or through AnsightNavigatorObserver so people and agents can understand the flow alongside other evidence.

Record a view directly:

await Ansight.instance.screenViewed(
  'Order details',
  details: <String, String>{'orderId': '123'},
);

For Navigator 1.x flows, attach the observer:

MaterialApp(
  navigatorObservers: <NavigatorObserver>[AnsightNavigatorObserver()],
);

The observer records pushed, replaced, and popped routes and maintains the stack returned by flutter.get_navigation_state. For Router-based navigation, call screenViewed(...) from the app’s route-state integration.