Sets a new custom painter delegate.
set painter(void Function(Canvas canvas, Size size, double value) val) { _painter = val; markNeedsPaint(); }