dvRouteFactory function

RouteFactory dvRouteFactory(
  1. List<RouteBase> routes, {
  2. String at = '/',
  3. RouteFactory? existing,
})

For Navigator 1.0: the app's own existing onGenerateRoute, with Dartvel's pages under at answered first.

A name that is one of Dartvel's paths gets Dartvel's page, even where existing would also answer it. Every other name, with its arguments, is existing's, and a name neither answers is unknown as it was before.

Implementation

RouteFactory dvRouteFactory(
  List<RouteBase> routes, {
  String at = '/',
  RouteFactory? existing,
}) =>
    (RouteSettings settings) =>
        dvOnGenerateRoute(settings, routes, at: at) ?? existing?.call(settings);