routes property

List<Route<T>> routes

Implementation

List<Route<T>> get routes {
  return _routes.fold<List<Route<T>>>([], (out, route) {
    if (route is SymlinkRoute<T>) {
      var childRoutes =
          route.router.routes.fold<List<Route<T>>>([], (out, r) {
        return out
          ..add(
            route.path.isEmpty ? r : new Route.join(route, r),
          );
      });

      return out..addAll(childRoutes);
    } else {
      return out..add(route);
    }
  });
}