resolvePage<T> abstract method
Creates a Page object for the given route.
This method is only called if hasResolverFor returns true for
the route.
Parameters
routeCompleter- Completer to signal route completion and return result. Must be completed when the route is popped.route- The original Route created via Navigator 1.0 APIkey- Unique key for the Page to maintain widget identity
Returns
A Page object that wraps the route and integrates it into
YxNavigation's declarative state management.
Example
@override
Page<Object?> resolvePage<T>({
required Completer<T?> routeCompleter,
required Route<T> route,
required LocalKey key,
}) {
final customRoute = route as MyCustomRoute<T>;
return MyCustomPage<T>(
key: key,
name: route.settings.name,
routeCompleter: routeCompleter,
// Copy relevant properties from route
transitionDuration: customRoute.transitionDuration,
child: /* build widget from route */,
);
}
Implementation
Page<Object?> resolvePage<T>({
required Completer<T?> routeCompleter,
required Route<T> route,
required LocalKey key,
});