defaultPaint method

void defaultPaint(
  1. PaintingContext context,
  2. Offset offset
)

Paints each child by walking the child list forwards.

See also:

  • defaultHitTestChildren, which implements hit-testing of the children in a manner appropriate for this painting strategy.

Implementation

void defaultPaint(PaintingContext context, Offset offset) {
  ChildType? child = firstChild;
  while (child != null) {
    final ParentDataType childParentData = child.parentData! as ParentDataType;
    context.paintChild(child, childParentData.offset + offset);
    child = childParentData.nextSibling;
  }
}