GoRouterModularContextExtension extension
Convenience extensions on BuildContext for the GenAI Components modular router.
These helpers query RouteRegistry (the internal name → path map populated
by Module.configureRoutes) so callers can navigate by name without
having to know the absolute path of a route.
- on
Methods
-
goIfDefined(
String pathOrName, {Object? extra}) → void -
Available on BuildContext, provided by the GoRouterModularContextExtension extension
Navigates topathOrNameonly if isRouteDefined returnstrue. -
isRouteDefined(
String pathOrName) → bool -
Available on BuildContext, provided by the GoRouterModularContextExtension extension
ReturnstruewhenpathOrNamematches a route currently registered in RouteRegistry.