sweepGradient method

void sweepGradient({
  1. AlignmentGeometry center = Alignment.center,
  2. double startAngle = 0.0,
  3. required double endAngle,
  4. required List<Color> colors,
  5. TileMode tileMode = TileMode.clamp,
  6. 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,
  );
}