PathRouteSettings.ofAppRoute constructor

PathRouteSettings.ofAppRoute(
  1. AppRoute<dynamic, RouteParams> appRoute, {
  2. RouteParams? routeParams,
})

Implementation

factory PathRouteSettings.ofAppRoute(
  AppRoute appRoute, {
  RouteParams? routeParams,
}) {
  final resolvedPath = appRoute.routeUri(routeParams);
  return PathRouteSettings(
    label: appRoute.name,
    routeParams: routeParams,
    resolvedPath: resolvedPath,
    route: appRoute.route,
  );
}