pushNewBuildContext method
void
pushNewBuildContext({
- required BuildContext context,
- required String routePath,
- required Object? state,
Implementation
void pushNewBuildContext({required BuildContext context, required String routePath, required Object? state}) {
_buildContextStack.add(HybridRoutePageContext(routePath, context, state));
// Initialize performance metrics for this route if not already present
if (!_routeMetrics.containsKey(routePath)) {
_routeMetrics[routePath] = RoutePerformanceMetrics(routePath);
// Initialize the navigation start time for the new route
_routeMetrics[routePath]!.navigationStartTime = DateTime.now();
// Capture the initial evaluated state when route is pushed
_routeMetrics[routePath]!.initialEvaluatedState = evaluated;
}
}