NeumorphicContainerPainter constructor

NeumorphicContainerPainter({
  1. Gradient? gradient,
  2. List<Shadow> shadows = const <Shadow>[],
  3. List<Shadow> innerShadows = const <Shadow>[],
  4. ShapeBorder shape = const ContinuousRectangleBorder(),
  5. double blur = 0,
  6. double borderBlur = 0,
  7. Color color = const Color.fromARGB(0, 0, 0, 0),
  8. double strokeWidth = 0,
  9. Gradient? borderGradient,
  10. Color? accentColor,
  11. double accentIntensity = 0,
  12. Alignment? accentAlignment,
})

Implementation

NeumorphicContainerPainter(
    {Gradient? gradient,
    List<Shadow> shadows = const <Shadow>[],
    List<Shadow> innerShadows = const <Shadow>[],
    ShapeBorder shape = const ContinuousRectangleBorder(),
    double blur = 0,
    double borderBlur = 0,
    Color color = const Color.fromARGB(0, 0, 0, 0),
    double strokeWidth = 0,
    Gradient? borderGradient,
    Color? accentColor,
    double accentIntensity = 0,
    Alignment? accentAlignment}) {
  shadowPainter = NeumorphicShadowPainter(
      shadows: shadows, shape: shape, strokeWidth: strokeWidth);
  surfacePainter = NeumorphicSurfacePainter(
      shape: shape,
      gradient: gradient,
      color: color,
      borderGradient: borderGradient,
      blur: blur,
      borderBlur: borderBlur,
      strokeWidth: strokeWidth);
  if (accentColor != null && accentAlignment != null && accentIntensity > 0) {
    accentPainter = NeumorphicAccentPainter(
        alignment: accentAlignment,
        value: accentIntensity,
        color: accentColor,
        shape: shape,
        strokeWidth: strokeWidth);
  }
  innerShadowPainter = NeumorphicInnerShadowPainter(
      innerShadows: innerShadows, shape: shape, strokeWidth: strokeWidth);
}