glow method

Paint glow(
  1. Color color, {
  2. double strokeWidth = 6,
  3. double blur = 6,
})

Soft blurred underlay drawn beneath a line/shape for depth. Returns an invisible paint for ChartStyle.flat (draws nothing).

Implementation

Paint glow(Color color, {double strokeWidth = 6, double blur = 6}) {
  if (style == ChartStyle.flat) {
    return Paint()..color = const Color(0x00000000);
  }
  final alpha = style == ChartStyle.glass ? 0.16 : 0.22;
  return Paint()
    ..color = color.withValues(alpha: alpha)
    ..strokeWidth = strokeWidth
    ..style = PaintingStyle.stroke
    ..strokeCap = StrokeCap.round
    ..strokeJoin = StrokeJoin.round
    ..maskFilter = MaskFilter.blur(BlurStyle.normal, blur)
    ..isAntiAlias = true;
}