auto_route library

Classes

ActiveGuardObserver
Observers the current guards processing navigation event
AdaptiveRoute
Builds an AutoRoute instance with RouteType.adaptive type
AdaptiveRouteType
Generates a route transitions based on platform
AutoLeadingButton
An AutoRoute replacement of appBar aut-leading-button
AutoPageView
Most of the code here is taking from flutter's TabView
AutoPageViewState
State implementation of AutoPageView
AutoRoute
A route entry configuration used in RouteMatcher to create RouteMatch's from paths and PageRouteInfo's
AutoRouteAware
An interface used to mark classes as AutoRouteAware entities usually implemented by widget States
AutoRouteGuard
A middleware for stacked routes where clients can either resume or abort the navigation event
AutoRouteGuardCallback
A simple implementation of AutoRouteGuard that calls the provided OnNavigation function
AutoRouteInformation
An extended type of RouteInformation that holds an extra property replace which forces the current route to be replaced
AutoRouteInformationProvider
The route information provider that propagates the platform route information changes.
AutoRouteNavigator
An AutoRoute Wrapper for Navigator it handles empty stacks and declarative routes
AutoRouteNavigatorState
State of AutoRouteNavigator
AutoRouteObserver
A Navigator observer that notifies AutoRouteAwares of changes to the state of their Route.
AutoRoutePage<T>
Creates a RoutePage based on routeData.type, The decision happens inside of onCreateRoute
AutoRouter
A Wrapper for Navigator that handles stack-routing
AutoRouterConfig
Classes annotated with AutoRouteConfig will generate an abstract class that extends RootStackRouter that can be extended by the annotated class to be used as the RootRouter of the App
AutoRouterDelegate
An auto_route implementation for RouterDelegate
AutoRouterModule
Module initializers will implement this class to be later used in the root router.
AutoRouterObserver
An extended version of NavigatorObserver to support Tab-int and tab-change events observation
AutoRouterState
State implementation of AutoRouter
AutoRouteWrapper
clients will implement this class to provide a wrapped route.
AutoTabsRouter
An implementation of a router widget that handles parallel routeing
AutoTabsRouterState<T extends AutoTabsRouter>
The state implementation of AutoTabsRouter
AutoTabsScaffold
A scaffold wrapper widget that makes creating an AutoTabsRouter much easier and cleaner
CupertinoFullscreenDialogTransition
An iOS-style transition used for summoning fullscreen dialogs.
CupertinoPageRoute<T>
A modal route that replaces the entire screen with an iOS transition.
CupertinoPageTransition
Provides an iOS-style page transition animation.
CupertinoRoute
Builds an AutoRoute instance with RouteType.cupertino type
CupertinoRouteType
Generates a route that uses CupertinoRouteTransitionMixin
CustomRoute
Builds an AutoRoute instance with RouteType.custom type
CustomRouteType
Generates a route with user-defined transitions
Holds deep-link information
DefaultRouteParser
AutoRoute extension of RouteInformationParser
DeferredLoadingPlaceholder
Displays a progress indicator when the widget is a deferred component and is currently being installed.
DeferredWidget
Wraps the child inside a deferred module loader.
HierarchySegment
An abstract representation of a RouteMatch
KeepAliveTab
A Wrapper widget to utilize AutomaticKeepAliveClientMixin
KeepAliveTabState
The state of KeepAliveTab
MaterialRoute
Builds an AutoRoute instance with RouteType.material type
MaterialRouteType
Generates a route that uses MaterialRouteTransitionMixin
An abstract parent type for all navigation failures
Represents a guarded navigation event which can be either continued or aborted used in AutoRouteGuard.onNavigation
NestedStackRouter
An Implementation of StackRouter used by nested AutoRouter widgets
NoShadowCupertinoPageTransitionsBuilder
A custom cupertino transition builder to fix unwanted shadows in nested navigator
PageInfo<Args>
Holds information of the generated RoutePage page
PagelessRoutesObserver
This ChangeNotifier observes the top-most entry in Navigator and reports whether it's a pageless route
PageRouteInfo<T>
Holds information of a named destination
Parameters
This class helps read typed data from raw maps, it's used for both path-parameters and query-parameters
PathParam
this annotation is used to make parameters that's supposed to take their values from the dynamic segments of a path
PendingRoutesHandler
Holds a one-time read initial routes value used by declarative routing widgets
Holds information of the deep-link coming from the platform window
QueryParam
this annotation is used to make parameters that's supposed to take their values from query params of the url
RedirectRoute
Builds a Redirect AutoRoute instance with no type
ReevaluateListenable
Abstraction for an Adapter that converts different listenable types e.g (streams) to a ChangeNotifier
RejectedByGuardFailure
A failure indicates that the one of the guards has aborted the navigation on this route by calling NavigationResolver.next with false value
ResolverResult
Holds NavigationResolver.resolveNext values
RootStackRouter
An Implementation of StackRouter used by AutoRouterDelegate
RouteCollection
Holds a single set of config-entries
RouteData
Holds final information of presented routes That's consumed by AutoRoutePage
RouteDataScope
Injects the given routeData to context so it can be looked up by any child widget
RouteMatch<T>
This is the result returned by RouteMatcher when a match is found
RouteNotFoundFailure
A failure indicates that the request route or path has not been found by the RouteMatcher
RoutePage<T>
This annotation is used to mark flutter widgets as routable pages by enabling the router to construct them.
RouterScope
Injects the given RoutingController to context so it can be looked up by any child widget
RouteType
An abstraction of route types used by AutoRoutePage.onCreateRoute to decide transition animations
RoutingController
An Abstraction for an object that manages page navigation
StackRouter
An implementation of a RoutingController that handles stack navigation
StackRouterScope
Injects the given StackRouter to context so it can be looked up by any child widget
TabPageRoute
Holds information of Tab-init and Tab-changed events used in AutoRouteAware and AutoRouterObserver
TabsRouter
An implementation of a RoutingController that handles parallel routeing
TabsRouterScope
Injects the given TabsRouter to context so it can be looked up by any child widget
TestRoute
Builds a simplified AutoRoute instance for test
TransitionsBuilders
all of the methods in this file map to existing, already-tested flutter widgets so no-need to include them in test-coverage a class that holds presets of common route transition builder
UrlState
UrlState Holds current url state in a more structured way it's used by Router as configuration state
WrappedRoute<T extends AutoRouteWrapper>
A wrapper widget that's used by the AutoRoutePage to wrap widgets that implement AutoRouteWrapper

Enums

LeadingType
AppBar Leading button types

Mixins

AutoRouteAwareStateMixin<T extends StatefulWidget>
a helper mixin to utilises AutoRouteAware in a better manner and reduce boilerplate code
CupertinoRouteTransitionOverrideMixin<T>
A mixin that implements methods and/or parameters of a PageRoute.

Extensions

AutoRouterX on BuildContext
An extension that provides common routing helpers on BuildContext
PrettyHierarchySegmentX on List<HierarchySegment>
An extension to create a pretty json output of the current hierarchy
RouteX on Route<T>
Adds auto-route data getter to Route

Constants

inheritPathParam → const PathParam
default PathParam.inherit()
kCupertinoModalBarrierColor → const Color
Barrier color for a Cupertino modal barrier.
pathParam → const PathParam
default PathParam()
queryParam → const QueryParam
default QueryParam()
routePage → const RoutePage
default routePage

Typedefs

AnimatedIndexedStackBuilder = Widget Function(BuildContext context, Widget child)
Signature for a wrapper builder used by _AutoTabsRouterIndexedStack
AnimatedIndexedStackTransitionBuilder = Widget Function(BuildContext context, Widget child, Animation<double> animation)
Signature for a translation builder used by _AutoTabsRouterIndexedStack
AppBarBuilder = PreferredSizeWidget Function(BuildContext context, TabsRouter tabsRouter)
Signature for a function that takes in BuildContext and TabsRouter and returns a PreferredSizeWidget usually an AppBar
AutoLeadingButtonBuilder = Widget Function(BuildContext context, LeadingType leadingType, VoidCallback? action)
Signature function to customize the build of a leading button
AutoTabsBuilder = Widget Function(BuildContext context, List<Widget> children, TabsRouter tabsRouter)
Signature for a wrapper builder used by _AutoTabsRouterBuilder
AutoTabsPageViewBuilder = Widget Function(BuildContext context, Widget child, PageController pageController)
Signature for a wrapper builder used by _AutoTabsRouterPageView
AutoTabsTabBarBuilder = Widget Function(BuildContext context, Widget child, TabController tabController)
Signature for a wrapper builder used by _AutoTabsRouterTabBar
BottomNavigationBuilder = Widget Function(BuildContext context, TabsRouter tabsRouter)
Signature for a function that takes in BuildContext and TabsRouter and returns a BottomNavigation Widget
CustomRouteBuilder<T> = Route<T> Function(BuildContext context, Widget child, AutoRoutePage<T> page)
Signature for custom router builder used by CustomRouteType
DeepLinkBuilder = FutureOr<DeepLink> Function(PlatformDeepLink deepLink)
Signature for a function that builds DeepLink deepLink is the pre-resolved link coming from platform window
DeepLinkTransformer = Future<Uri> Function(Uri uri)
Signature for a function that transform the incoming Uri uri is the pre-resolved uri coming from platform window This is call before the DeepLinkBuilder to allow to transform the Uri
DeferredWidgetBuilder = Widget Function()
Signature for a function that returns a widget Used in DeferredWidget to build the lazy-loaded library
FloatingActionButtonBuilder = Widget? Function(BuildContext context, TabsRouter tabsRouter)
Signature for a function that takes in BuildContext and TabsRouter and returns a FloatingActionButton Widget or null
LibraryLoader = Future<void> Function()
Signature for a function that returns a void future Used in DeferredWidget to load deferred libraries
Signature for a builder that returns a list of NavigatorObserver
OnNavigateCallBack = void Function(UrlState tree)
Signature of a callback used in declarative routing to report url state changes
OnNavigation = dynamic Function(NavigationResolver resolver, StackRouter router)
Signature for on navigation function used by AutoRouteGuard
OnNavigationChanged = dynamic Function(TabsRouter tabsRouter)
Signature for a callback function used by _AutoTabsRouterBuilder
OnNavigationFailure = void Function(NavigationFailure failure)
Signature for a function that takes a NavigationFailure Used in RoutingController.
OnNestedNavigateCallBack = void Function(List<RouteMatch> routes)
Signature of a callback used by declarative
PageBuilder = AutoRoutePage Function(RouteData data)
Signature for a function uses pagesMap to build an AutoRoutePage
PageFactory = Page Function(RouteData data)
Signature for a function that builds an AutoRoutePage Used by RoutingController
RestorationIdBuilder = String Function(RouteMatch match)
Signature for a function that builds the page restorationId Used in AutoRoutePage
RouteDataPredicate = bool Function(RouteData route)
Signature of a predicate to select RouteData
RoutePopCallBack = void Function(RouteMatch route, dynamic results)
Signature of a callback to report route pop events
RoutesBuilder = List<PageRouteInfo> Function(PendingRoutesHandler handler)
Signature of a callback used in declarative routing
TitleBuilder = String Function(BuildContext context, RouteData data)
Signature for a function that builds the route title Used in AutoRoutePage