childAfter method

RenderBox? childAfter(
  1. RenderBox child

The next child after the given child in the child list according to the traversal order of the mainAxis.

The mainAxis correlates with the ChildVicinity of each child to paint the children in a row or column major order.

By default, the mainAxis is Axis.vertical, which would result in a row major paint order, visiting children in the horizontal indices before advancing to the next vertical index.

This method is useful when overriding paint in order to paint children in the correct order.


RenderBox? childAfter(RenderBox child) {
  assert(child.parent == this);
  return parentDataOf(child)._nextSibling;