go_router library Null safety

A declarative router for Flutter based on Navigation 2 supporting deep linking, data-driven routes and more.

Classes

CustomTransitionPage<T>
Page with custom transition functionality.
GoRoute
A route that is displayed visually above the matching parent route using the Navigator.
GoRouteData
Baseclass for supporting typed routing.
GoRouter
The top-level go router class.
GoRouterState
The route state during routing.
InheritedGoRouter
GoRouter implementation of InheritedWidget.
NoTransitionPage<T>
Custom transition page with no transition.
RouteBase
The base class for GoRoute and ShellRoute.
ShellRoute
A route that displays a UI shell around the matching child route.
TypedGoRoute<T extends GoRouteData>
Annotation for types that support typed routing.

Extensions

GoRouterHelper
Dart extension to add navigation function to a BuildContext object, e.g. context.go('/');

Enums

UrlPathStrategy
The path strategy for use in GoRouter.setUrlPathStrategy.

Typedefs

GoRouterPageBuilder = Page Function(BuildContext context, GoRouterState state)
The page builder for GoRoute.
GoRouterRedirect = FutureOr<String?> Function(BuildContext context, GoRouterState state)
The signature of the redirect callback.