RouterConfiguration class

A configuration of router that can be use for easy & powerful navigations.

To use this for navigation, add instance of this to your MaterialApp

child: MaterialApp(
    // ...
    navigatorKey: navigationProvider.navigatorKey,
    onGenerateRoute: navigationProvider.onGenerateRoute,
    onUnknownRoute: navigationProvider.onUnknownRoute,
    // ...
Mixed in types


RouterConfiguration({required List<NavigationPathInterface> paths, GlobalKey<NavigatorState>? navigatorKey, List<NamedPath>? namedPaths, LinkNavigatorInterface? linkNavigator, NavigatorLogger? logger, RouteBuilder? routeBuilder})
Creates a route configuration with paths for navigation.


hashCode int
The hash code for this object.
no setterinherited
lastGeneratedRoute Route?
Last route that was created from this RouterConfiguration.onGenerateRoute.
no setteroverride
linkNavigator LinkNavigatorInterface?
This is responsible for responding to navigation requests made from RouterConfiguration.navigateFromUri.
logger NavigatorLogger
A logger for logging navigation requests and issues.
namedPathsMap Map<String, NamedPath>
List of NamedPath for route matching converted to a map of String to NamedPath. When a named route is pushed with Navigator.pushNamed, the route name from settings is used to match with NamedPath.pathName from this map to retrieve builder.
A key to use when building the Navigator. Usually a reference to MaterialApp.navigatorKey.
no setteroverride
paths List<NavigationPathInterface>
List of NavigationPath for route matching. When a named route is pushed with Navigator.pushNamed, the route name is matched with the NavigationPath.matcher in the list below. As soon as there is a match, the associated builder will be returned. This means that the paths higher up in the list will take priority.
getter/setter pair
routeBuilder RouteBuilder?
A common route builder for all routes. Used when NavigationPath.routeBuilder is null. If this value is null, then fallbacks to NoAnimationMaterialPageRoute on web and MaterialPageRoute for others.
runtimeType Type
A representation of the runtime type of the object.
no setterinherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
onGenerateRoute(RouteSettings settings) Route?
The route generator callback used when the app is navigated to a named route. Set it on the MaterialApp.onGenerateRoute or WidgetsApp.onGenerateRoute to make use of the paths for route matching.
onUnknownRoute(RouteSettings settings) Route?
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.