CustomPaintModifier constructor

const CustomPaintModifier({
  1. Key? key,
  2. Widget? child,
  3. Key? modifierKey,
  4. CustomPainter? painter,
  5. CustomPainter? foregroundPainter,
  6. Size size = Size.zero,
  7. bool isComplex = false,
  8. bool willChange = false,
})

Creates a widget that delegates its painting.

Implementation

const CustomPaintModifier({
  super.key,
  super.child,
  super.modifierKey,
  this.painter,
  this.foregroundPainter,
  this.size = Size.zero,
  this.isComplex = false,
  this.willChange = false,
}) : assert(painter != null || foregroundPainter != null || (!isComplex && !willChange));