NeumorphicAccentPainter constructor

NeumorphicAccentPainter({
  1. required Color color,
  2. required Alignment alignment,
  3. required double value,
  4. dynamic shape,
  5. required dynamic strokeWidth,
})

Implementation

NeumorphicAccentPainter(
    {required this.color,
    required this.alignment,
    required this.value,
    shape,
    required strokeWidth})
    : super(shape: shape, strokeWidth: strokeWidth) {
  if (value < 0) {
    value = 0;
  } else if (value > 1) {
    value = 1;
  }
  paintObject = Paint()
    ..color = color.withOpacity(value / 3)
    ..maskFilter =
        MaskFilter.blur(BlurStyle.normal, convertRadiusToSigma(15));
}