allHandlers property

List<T> allHandlers

All handlers on this sub-path and its children.

Implementation

List<T> get allHandlers {
  final handlers = <T>[];

  void crawl(RoutingResult<T> result) {
    handlers.addAll(result.handlers);

    if (result.nested.isNotEmpty == true) {
      for (var r in result.nested) {
        crawl(r);
      }
    }
  }

  crawl(this);

  return handlers;
}