CustomPainter foregroundPainter

The foreground custom paint delegate.

This painter, if non-null, is called to paint in front of the children.

Source

CustomPainter get foregroundPainter => _foregroundPainter;
void foregroundPainter=(CustomPainter newPainter)

Set a new foreground 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 foreground custom painter.

Source

set foregroundPainter (CustomPainter newPainter) {
  if (_foregroundPainter == newPainter)
    return;
  CustomPainter oldPainter = _foregroundPainter;
  _foregroundPainter = newPainter;
  _didUpdatePainter(_foregroundPainter, oldPainter);
}