LinearGradientPainter constructor
const
LinearGradientPainter({
- AlignmentGeometry begin = Alignment.centerLeft,
- AlignmentGeometry end = Alignment.centerRight,
- required List<
Color> colors, - List<
double> ? stops, - TileMode tileMode = TileMode.clamp,
- GradientTransform? transform,
- ColorSpace? colorSpace,
- bool invert = false,
- double density = 0.075,
A 2D linear gradient.
See: LinearGradient
Implementation
const LinearGradientPainter({
AlignmentGeometry begin = Alignment.centerLeft,
AlignmentGeometry end = Alignment.centerRight,
required List<Color> colors,
List<double>? stops,
TileMode tileMode = TileMode.clamp,
GradientTransform? transform,
this.colorSpace,
this.invert = false,
this.density = 0.075,
}) : assert(density > 0.0 && density <= 1.0),
assert(stops == null || stops.length == colors.length),
super(
begin: begin,
end: end,
colors: colors,
stops: stops,
tileMode: tileMode,
transform: transform,
);