update method
void
update({
- bool? isComplex,
- bool? willChange,
- CustomPainter? foregroundPainter,
- CustomPainter? painter,
Updates the properties of the CustomPaint widget and triggers a rebuild of the paint without affecting the child widget.
isComplex
- Optional new value for whether the paint is complex.
willChange
- Optional new value for whether the paint will change.
foregroundPainter
- Optional new foreground painter.
painter
- Optional new painter.
Implementation
void update({
bool? isComplex,
bool? willChange,
CustomPainter? foregroundPainter,
CustomPainter? painter,
}) {
setState(() {
if (isComplex != null) this.isComplex = isComplex;
if (willChange != null) this.willChange = willChange;
if (foregroundPainter != null) this.foregroundPainter = foregroundPainter;
if (painter != null) this.painter = painter;
});
}