NeumorphicButtonPainter constructor
NeumorphicButtonPainter({
- Gradient? gradient,
- List<
Shadow> shadows = 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,
- required double animationValue,
- Key? key,
Implementation
NeumorphicButtonPainter(
{Gradient? gradient,
List<Shadow> shadows = 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,
required this.animationValue,
Key? key}) {
shadowPainter = NeumorphicShadowPainter(
shadows: shadows, shape: shape, strokeWidth: strokeWidth);
if (accentColor != null && accentAlignment != null && accentIntensity > 0) {
accentPainter = NeumorphicAccentPainter(
alignment: accentAlignment,
value: accentIntensity,
color: accentColor,
shape: shape,
strokeWidth: strokeWidth);
}
surfacePainter = NeumorphicSurfacePainter(
shape: shape,
gradient: gradient,
color: color,
borderGradient: borderGradient,
blur: blur,
borderBlur: borderBlur,
strokeWidth: strokeWidth);
}