ConvexPainter constructor
ConvexPainter({})
Create painter
Implementation
ConvexPainter({
required this.top,
required this.width,
required this.height,
this.leftPercent = const AlwaysStoppedAnimation<double>(0.5),
this.textDirection,
Color color = Colors.white,
Color shadowColor = Colors.black38,
double sigma = 2,
Gradient? gradient,
double? cornerRadius,
}) : super(repaint: leftPercent) {
_paint.color = color;
try {
_shadowPaint
..color = shadowColor
..maskFilter = MaskFilter.blur(BlurStyle.outer, sigma);
} catch (e, s) {
debugPrintStack(label: 'ElevationError', stackTrace: s);
}
_gradient.gradient = gradient;
_shape = ConvexNotchedRectangle(radius: cornerRadius ?? 0);
}