sweepGradient method
void
sweepGradient({
- AlignmentGeometry center = Alignment.center,
- double startAngle = 0.0,
- required double endAngle,
- required List<
Color> colors, - TileMode tileMode = TileMode.clamp,
- List<
double> ? stops,
inherited
Creates a sweep gradient.
The colors
argument must not be null. If stops
is non-null, it must have the same length as colors
.
Choose to calculate angles with radians or not through useRadians
parameter.
end
default to 1.0 if useRadians
is false and 2 * pi if useRadians
is true,
Implementation
void sweepGradient(
{AlignmentGeometry center = Alignment.center,
double startAngle = 0.0,
required double endAngle,
required List<Color> colors,
TileMode tileMode = TileMode.clamp,
List<double>? stops}) {
_styleModel.gradient = SweepGradient(
center: center,
startAngle: angleToRadians(startAngle, angleFormat),
endAngle: angleToRadians(endAngle, angleFormat),
colors: colors,
stops: stops,
tileMode: tileMode,
);
}