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 sync* {
  if (firstChild == null) return;
  var child = center;
  while (child != null) {
    yield child;
    child = childAfter(child);
  }
  child = childBefore(center!);
  while (child != null) {
    yield child;
    child = childBefore(child);
  }
}