GradientPainter constructor
const
GradientPainter({
- required ShapePainter basePainter,
- required List<
Color> colors, - List<
double> ? stops, - GradientType gradientType = GradientType.linear,
- bool applyAfter = true,
Creates a gradient painter.
basePainter is the painter to apply the gradient effect to.
colors is the list of colors for the gradient.
stops is the list of stops for the gradient. If null, colors are distributed evenly.
gradientType is the type of gradient to apply.
applyAfter is whether the gradient should be applied after the base painter.
Implementation
const GradientPainter({
required this.basePainter,
required this.colors,
this.stops,
this.gradientType = GradientType.linear,
this.applyAfter = true,
});