routesRecursively static method

Iterable<RouteBase> routesRecursively(
  1. Iterable<RouteBase> routes
)

Builds a lists containing the provided routes along with all their descendant routes.

Implementation

static Iterable<RouteBase> routesRecursively(Iterable<RouteBase> routes) {
  return routes.expand(
      (RouteBase e) => <RouteBase>[e, ...routesRecursively(e.routes)]);
}