shadowPaint function

Paint shadowPaint(
  1. ShadowEffect effect
)

The shadow's color, blurred by a mask when it has a blur.

Implementation

ui.Paint shadowPaint(ShadowEffect effect) {
  final ui.Paint paint = ui.Paint()..color = effect.color.toColor();
  if (effect.blur > 0) paint.maskFilter = .blur(.normal, shadowSigma(effect));
  return paint;
}