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 painting without affecting the child widget.
isComplex - Optional new value for whether the painting is complex.
willChange - Optional new value for whether the painting 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;
  });
}