paint method

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

Default paint implementation.

RenderBox paints no self-content; it forwards painting to its RenderBox children. Subclasses override to draw their own content.

Implementation

@override
void paint(PaintingContext context, Offset offset) {
  final child = this.child;
  if (child == null) return;

  // Include our own position (x, y) consistent with other render objects
  context.paintChild(child, offset + Offset(x, y));
}