go_router_modular library

Classes

Allow
Allows the navigation to proceed.
Bind<T>
Represents a binding between a type and its factory function.
Block
Blocks the navigation from proceeding.
ChildRoute
CustomModularLoader
CustomParameterCodec
annotation to define a custom parameter decoder/encoder this is useful when the is encoded/decoded in a non-standard way like base64Url this must be used as an annotation on a field
CustomTransitionPage<T>
Page with custom transition functionality.
EventBus
Dispatches events to listeners using the Dart Stream API. The EventBus enables decoupled applications. It allows objects to interact without requiring to explicitly define listeners and keeping track of them.
EventModule
Módulo abstrato com suporte a eventos.
GoRoute Get started Configuration Redirection Transition animations Named routes
A route that is displayed visually above the matching parent route using the Navigator.
GoRouteData Type-safe routes
A class to represent a GoRoute in Type-safe routing.
GoRouteInformationParser
Converts between incoming URLs and a RouteMatchList using RouteMatcher.
GoRouteInformationProvider
The RouteInformationProvider created by go_router.
GoRouterDelegate
GoRouter implementation of RouterDelegate.
GoRouterState
The route state during routing.
GoTransitionPage
GoTransitionRoute
GoTransitionSettings
GoTransitionStyle
GuardFn
Adapta uma função redirect para um RouteGuard.
ImperativeRouteMatch
The route match that represent route pushed through GoRouter.push.
InheritedGoRouter
GoRouter implementation of InheritedWidget.
InjectionManager
Manages module lifecycle: registration, bind injection, and disposal.
Injector
InjectorReader
Read-only interface for dependency access.
Modular
Main class to manage modular routing using GoRouter.
ModularApp
ModularBranch
Represents a branch in a StatefulShellModularRoute.
ModularEvent
Singleton class to manage global events in the application.
ModularLoader
ModularLoaderController
ModularRoute
Module
ModuleBranch
Atalho para uma branch do StatefulShellModularRoute que monta um único Module em um segmento de URL (path).
ModuleRoute
NoTransitionPage<T>
Custom transition page with no transition.
OnEnterResult
The result of an onEnter callback.
RelativeGoRouteData Type-safe routes
A class to represent a relative GoRoute in Type-safe routing.
RouteBase
The base class for GoRoute and ShellRoute.
RouteBuilder
Builds the top-level Navigator for GoRouter.
RouteConfiguration
The route configuration for GoRouter configured by the app.
RouteData
Baseclass for supporting Type-safe routing.
RouteGuard
Proteção de rota declarativa e reutilizável.
RouteInformationState<T>
The data class to be stored in RouteInformation.state to be used by GoRouteInformationParser.
RouteMatch
An matched result by matching a GoRoute against a location.
RouteMatchBase
The base class for various route matches.
RouteMatchList
The list of RouteMatchBase objects.
RouteWithCompleterService
Serviço de completers de navegação usado pelas variantes assíncronas de navegação (goAsync, pushAsync, …) e pelo registro de binds em rotas de módulo, para aguardar a conclusão de uma navegação.
RoutingConfig Configuration
A set of parameters that defines routing in GoRouter.
ShellModularRoute
ShellRouteBase
Base class for classes that act as shells for sub-routes, such as ShellRoute and StatefulShellRoute.
ShellRouteContext
Context object used when building the shell and Navigator for a shell route.
ShellRouteData
A class to represent a ShellRoute in Type-safe routing.
ShellRouteMatch
An matched result by matching a ShellRoute against a location.
StatefulNavigationShell
Widget for managing the state of a StatefulShellRoute.
StatefulNavigationShellState
State for StatefulNavigationShell.
StatefulShellBranch
Representation of a separate branch in a stateful navigation tree, used to configure StatefulShellRoute.
StatefulShellBranchData
Base class for supporting StatefulShellRoute
StatefulShellBranchTransitions
Presets de ShellNavigationContainerBuilder para animar a troca entre branches de um StatefulShellRoute, no padrão do exemplo oficial custom stateful shell (AnimatedBranchContainer).
StatefulShellModularRoute
Modular wrapper for StatefulShellRoute.
StatefulShellRoute Configuration
A route that displays a UI shell with separate Navigators for its sub-routes.
StatefulShellRouteData
Base class for supporting StatefulShellRoute
TypedGoRoute<T extends GoRouteData>
A superclass for each typed go route descendant
TypedQueryParameter<T>
Annotation to override the URI name for a route parameter.
TypedRelativeGoRoute<T extends RelativeGoRouteData>
A superclass for each typed relative go route descendant
TypedRoute<T extends RouteData>
A superclass for each typed route descendant
TypedShellRoute<T extends ShellRouteData>
A superclass for each typed shell route descendant
TypedStatefulShellBranch<T extends StatefulShellBranchData>
A superclass for each typed shell route descendant
TypedStatefulShellRoute<T extends StatefulShellRouteData>
A superclass for each typed shell route descendant

Enums

The type of the navigation.

Mixins

GoTransitions
ModularEventMixin<T extends StatefulWidget>
Mixin para State<T> que expõe o método on para registrar listeners de eventos e cancela automaticamente todas as subscriptions no dispose do widget.

Extensions

BindContextExtension on BuildContext
GoReverseAnimationExtension on Animation<double>
GoRouterExtension on BuildContext
Extension to add functionalities to BuildContext for GoRouter.
GoRouterHelper on BuildContext
Dart extension to add navigation function to a BuildContext object, e.g. context.go('/');
GoTransitionExtension on GoTransition
GoTransitionModifiers on GoTransition
ModularRouterConfigCopyWith on GoRouter
Adds a copyWith to the GoRouter returned by Modular.routerConfig.
PreviousChildContextExtension on BuildContext

Constants

guardsRedirectDeprecation → const String
Deprecation message shared by every legacy redirect parameter (routes and Modular.configure). Explains both migration paths to guards: a dedicated class extends RouteGuard, or an inline GuardFn.

Properties

defaultModularEventBus EventBus
Exposes the default EventBus for use by EventModule.
no setter
modularNavigatorKey GlobalKey<NavigatorState>
Estado de runtime neutro do roteador modular.
getter/setter pair

Functions

clearEventModuleState() → void
Clears all global event state - useful for testing.

Typedefs

CanTransition = bool Function(TransitionRoute nextRoute)
ExitCallback = FutureOr<bool> Function(BuildContext context, GoRouterState state)
Signature for function used in RouteBase.onExit.
FutureBinds = FutureOr<void>
FutureModules = FutureOr<List<Module>>
GoExceptionHandler = void Function(BuildContext context, GoRouterState state, GoRouter router)
The function signature of GoRouter.onException.
GoRouterBuilderWithNav = Widget Function(BuildContext context, Widget child)
Signature of a go router builder function with navigator.
GoRouterModular = Modular
Alias to simplify the use of Modular.
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.
GoRouterWidgetBuilder = Widget Function(BuildContext context, GoRouterState state)
The widget builder for GoRoute.
The function signature for navigation callbacks in _OnEnterHandler.
Signature for functions used to build Navigators
OnEnter = FutureOr<OnEnterResult> Function(BuildContext context, GoRouterState currentState, GoRouterState nextState, GoRouter goRouter)
The signature for the top-level onEnter callback.
OnEnterThenCallback = FutureOr<void> Function()
Signature for callbacks invoked after an OnEnterResult is resolved.
PageRouteTransitionsBuilder = Widget Function(PageRoute route, BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, Widget child)
ParserExceptionHandler = RouteMatchList Function(BuildContext context, RouteMatchList routeMatchList)
The function signature of GoRouteInformationParser.onParserException.
PopPageWithRouteMatchCallback = bool Function(Route route, dynamic result, RouteMatchBase match)
Signature for a function that takes in a route to be popped with the result and returns a boolean decision on whether the pop is successful.
QueryParameterDecoder<T> = T Function(String value)
Signature for custom query parameter decoding functions.
QueryParameterEncoder<T> = String Function(T value)
Signature of custom query parameter encoding.
RouteInfoState = RouteInformationState
Type alias for route information state with dynamic type parameter.
RouteMatchVisitor = bool Function(RouteMatchBase)
The function signature for RouteMatchList.visitRouteMatches
ShellNavigationContainerBuilder = Widget Function(BuildContext context, StatefulNavigationShell navigationShell, List<Widget> children)
Builder for a custom container for the branch Navigators of a StatefulShellRoute.
ShellRouteBuilder = Widget Function(BuildContext context, GoRouterState state, Widget child)
The widget builder for ShellRoute.
ShellRoutePageBuilder = Page Function(BuildContext context, GoRouterState state, Widget child)
The page builder for ShellRoute.
StatefulShellRouteBuilder = Widget Function(BuildContext context, GoRouterState state, StatefulNavigationShell navigationShell)
The widget builder for StatefulShellRoute.
StatefulShellRoutePageBuilder = Page Function(BuildContext context, GoRouterState state, StatefulNavigationShell navigationShell)
The page builder for StatefulShellRoute.

Exceptions / Errors

GoError
Thrown when GoRouter is used incorrectly.
GoException
Thrown when GoRouter can not handle a user request.
ModularException