CustomPaint constructor Null safety
- {Key? key,
- CustomPainter? painter,
- CustomPainter? foregroundPainter,
- Size size = Size.zero,
- bool isComplex = false,
- bool willChange = false,
- Widget? child}
Creates a widget that delegates its painting.
Implementation
const CustomPaint({
super.key,
this.painter,
this.foregroundPainter,
this.size = Size.zero,
this.isComplex = false,
this.willChange = false,
super.child,
}) : assert(size != null),
assert(isComplex != null),
assert(willChange != null),
assert(painter != null || foregroundPainter != null || (!isComplex && !willChange));