createSweepGradient function

Widget createSweepGradient(
  1. List<Color> colors,
  2. AlignmentGeometry center,
  3. double startAngle,
  4. double endAngle,
  5. List<double> stops,
  6. List<double> opacities,
  7. TileMode tileMode,
  8. GradientTransform transform
)

Implementation

Widget createSweepGradient(
  List<Color> colors,
  AlignmentGeometry center,
  double startAngle,
  double endAngle,
  List<double> stops,
  List<double> opacities,
  TileMode tileMode,
  GradientTransform transform
) {
  return Container(
    decoration: BoxDecoration(
      gradient: SweepGradient(
        colors: _applyOpacitiesToColors(colors, opacities),
        center: center != null ? center : Alignment.center,
        startAngle: startAngle != null ? startAngle : 0.0,
        endAngle: endAngle != null ? endAngle :math.pi * 2,
        stops: stops,
        tileMode: tileMode != null ? tileMode : TileMode.clamp,
        transform: transform
      ),
    ),
  );
}