childrenInHitTestOrder property

  1. @override
Iterable<RenderSliver> childrenInHitTestOrder
override

Provides an iterable that walks the children of the viewport, in the order that hit-testing should use.

This should be the reverse order of childrenInPaintOrder.

Implementation

@override
Iterable<RenderSliver> get childrenInHitTestOrder {
  final List<RenderSliver> children = <RenderSliver>[];
  RenderSliver? child = firstChild;
  while (child != null) {
    children.add(child);
    child = childAfter(child);
  }
  return children;
}