dvOrderGoRoutes function

List<RouteBase> dvOrderGoRoutes(
  1. List<RouteBase> routes
)

routes ordered so that no route hides another: a static segment is matched before a parameter, a parameter before a catch-all, whatever order they were declared in. A shell and a route with children move as one. Throws DVRouteOrderException (DV-ROUTE-004) when no order works.

Implementation

List<RouteBase> dvOrderGoRoutes(List<RouteBase> routes) =>
    dvOrderRoutes<RouteBase>(routes, (RouteBase r) => _leaves(r, ''));