$applyPaint method
(Internal usage) Applies the paint settings to the canvas.
Implementation
@override
void $applyPaint(Canvas? canvas) {
var doSaveLayer = $alpha != 1 || usePaint;
if (doSaveLayer) {
if (_invalidColor) _validateColor();
final rect = getBounds(this)!.toNative();
canvas!.saveLayer(rect, _paint);
}
canvas!.drawPicture(_data!.picture!);
if (doSaveLayer) {
canvas.restore();
}
}