CustomPainter painter

The background custom paint delegate.

This painter, if non-null, is called to paint behind the children.

Source

CustomPainter get painter => _painter;
void painter=(CustomPainter newPainter)

Set a new background custom paint delegate.

If the new delegate is the same as the previous one, this does nothing.

If the new delegate is the same class as the previous one, then the new delegate has its CustomPainter.shouldRepaint called; if the result is true, then the delegate will be called.

If the new delegate is a different class than the previous one, then the delegate will be called.

If the new value is null, then there is no background custom painter.

Source

set painter (CustomPainter newPainter) {
  if (_painter == newPainter)
    return;
  CustomPainter oldPainter = _painter;
  _painter = newPainter;
  _didUpdatePainter(_painter, oldPainter);
}