dvMountRoutes function
routes mounted at at, for a host GoRouter's routes:.
at is / or a path with no trailing slash (/app). Records the mount
for DVNavigation.locationOf.
Implementation
List<RouteBase> dvMountRoutes(List<RouteBase> routes, {String at = '/'}) {
if (!at.startsWith('/') || (at.length > 1 && at.endsWith('/'))) {
throw ArgumentError.value(
at,
'at',
"is not a mount point: write '/' or a path such as '/app'",
);
}
_owned = <String>[for (final RouteBase route in routes) ..._paths(route, '')];
_mountedAt = at;
if (at == '/') return routes;
return <RouteBase>[for (final RouteBase route in routes) _top(route, at)];
}