SweepGradient constructor Null safety
- {AlignmentGeometry center = Alignment.center,
- double startAngle = 0.0,
- double endAngle = math.pi * 2,
- required List<
Color> colors, - List<
double> ? stops, - TileMode tileMode = TileMode.clamp,
- GradientTransform? transform}
Creates a sweep gradient.
The colors argument must not be null. If stops is non-null, it must have the same length as colors.
Implementation
const SweepGradient({
this.center = Alignment.center,
this.startAngle = 0.0,
this.endAngle = math.pi * 2,
required super.colors,
super.stops,
this.tileMode = TileMode.clamp,
super.transform,
}) : assert(center != null),
assert(startAngle != null),
assert(endAngle != null),
assert(tileMode != null);