paint method

  1. @override
void paint(
  1. dynamic context,
  2. dynamic offset
)

PAINT

Implementation

@override
void paint(PaintingContext context, Offset offset) {
  // Paint the background.
  context.canvas.drawRect(
    offset & size,
    Paint()..color = Color(0x00FFFFFF),
  );

  void paintChild(RenderBox child, PaintingContext context, Offset offset) {
    final BoxParentData childParentData = child.parentData! as BoxParentData;
    context.paintChild(child, childParentData.offset + offset);
  }

  for (RenderBox box in children) {
    paintChild(box, context, offset);
  }

  // Paint an overflow indicator in debug mode if the children want to be
  // larger than the incoming constraints allow.
  assert(() {
    paintOverflowIndicator(
      context,
      offset,
      Offset.zero & size,
      Offset.zero & contentSize,
    );
    return true;
  }());
}