performPaint method
RenderLayoutBox real paint things after basiclly paint box model. Override which to paint layout or intrinsic things. Used by RenderReplaced, RenderFlowLayout, RenderFlexLayout.
Implementation
@override
void performPaint(PaintingContext context, Offset offset) {
for (int i = 0; i < paintingOrder.length; i++) {
RenderObject child = paintingOrder[i];
// Don't paint placeholder of positioned element.
if (child is! RenderPositionPlaceholder) {
late DateTime childPaintStart;
if (kProfileMode && PerformanceTiming.enabled()) {
childPaintStart = DateTime.now();
}
final RenderLayoutParentData childParentData =
child.parentData as RenderLayoutParentData;
context.paintChild(child, childParentData.offset + offset);
if (kProfileMode && PerformanceTiming.enabled()) {
DateTime childPaintEnd = DateTime.now();
childPaintDuration += (childPaintEnd.microsecondsSinceEpoch -
childPaintStart.microsecondsSinceEpoch);
}
}
}
}