RouterConfiguration constructor

RouterConfiguration(
  1. {required List<NavigationPathInterface> paths,
  2. GlobalKey<NavigatorState>? navigatorKey,
  3. List<NamedPath>? namedPaths,
  4. LinkNavigatorInterface? linkNavigator,
  5. NavigatorLogger? logger,
  6. RouteBuilder? routeBuilder}
)

Creates a route configuration with paths for navigation.

Implementation

RouterConfiguration({
  required this.paths,
  GlobalKey<NavigatorState>? navigatorKey,
  List<NamedPath>? namedPaths,
  this.linkNavigator,
  NavigatorLogger? logger,
  this.routeBuilder,
})  : logger = logger ?? NavigatorLogger(),
      navigatorKey = navigatorKey ?? GlobalKey<NavigatorState>(),
      namedPathsMap = _createNamedPaths(namedPaths);