RenderCustomPaint constructor Null safety

RenderCustomPaint(
  1. {CustomPainter? painter,
  2. CustomPainter? foregroundPainter,
  3. Size preferredSize = Size.zero,
  4. bool isComplex = false,
  5. bool willChange = false,
  6. RenderBox? child}
)

Creates a render object that delegates its painting.

Implementation

RenderCustomPaint({
  CustomPainter? painter,
  CustomPainter? foregroundPainter,
  Size preferredSize = Size.zero,
  this.isComplex = false,
  this.willChange = false,
  RenderBox? child,
}) : assert(preferredSize != null),
     _painter = painter,
     _foregroundPainter = foregroundPainter,
     _preferredSize = preferredSize,
     super(child);