paint method

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

PAINT

Implementation

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

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

  for (final 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;
  }());
}