fillPaint method
Implementation
void fillPaint(Paint paint, Rect? rect, {double? colorOpacity}) {
paint.reset();
if (color != null) {
if (colorOpacity != null) {
paint.color = color!.withOpacity(colorOpacity);
} else {
paint.color = color!;
}
}
if (shader != null && rect != null) {
paint.shader = shader!.toShader(rect, colorOpacity);
}
}