dvConfigRoutes function
List<RouteBase>
dvConfigRoutes(
- List<
DVRouteNode> nodes, { - SeoProps seo = SeoProps.empty,
- PageTransitionSpec transition = const PageTransitionSpec(),
- GoRouterRedirect? inheritedRedirect,
nodes as go_router routes, for the generated router.
Each screen is given what a page is given that does not come from a
folder: the route state, the page lifecycle, the SEO defaults with the
route's title, and a page transition. inheritedRedirect is the
application's root _guard.dart, applied over every top-level node except
a DVGoRoutes, which brings its own.
Registers a link preview for each parameterless route no redirect covers.
Implementation
List<RouteBase> dvConfigRoutes(
List<DVRouteNode> nodes, {
SeoProps seo = SeoProps.empty,
PageTransitionSpec transition = const PageTransitionSpec(),
GoRouterRedirect? inheritedRedirect,
}) {
final _Convert convert = _Convert(seo: seo, transition: transition);
return <RouteBase>[
for (final DVRouteNode node in nodes)
if (node is DVGoRoutes)
...node.routes
else
convert.node(
node,
parentPath: '',
guarded: inheritedRedirect != null,
inherited: inheritedRedirect,
),
];
}