CircularPercentIndicator constructor

const CircularPercentIndicator({
  1. Key? key,
  2. double percent = 0.0,
  3. double radius = 50.0,
  4. double lineWidth = 5.0,
  5. double? backgroundWidth,
  6. Color progressColor = Colors.blue,
  7. Color backgroundColor = const Color(0xFFE0E0E0),
  8. Gradient? linearGradient,
  9. Gradient? backgroundGradient,
  10. bool fillColor = false,
  11. Color? circleColor,
  12. CircularStrokeCap circularStrokeCap = CircularStrokeCap.round,
  13. CircularStartAngle startAngle = CircularStartAngle.top,
  14. bool reverse = false,
  15. bool animation = false,
  16. Duration animationDuration = const Duration(milliseconds: 500),
  17. Curve animationCurve = Curves.easeInOut,
  18. Widget? center,
  19. Widget? header,
  20. Widget? footer,
  21. bool rotateLinearGradient = false,
  22. VoidCallback? onAnimationEnd,
  23. bool restartAnimation = false,
  24. ArcType? arcType,
  25. Color? arcBackgroundColor,
  26. bool animateFromLastPercent = false,
  27. Widget? child,
  28. CircularChildPosition childPosition = CircularChildPosition.center,
  29. bool showPercentage = false,
  30. TextStyle? percentageTextStyle,
  31. int percentageDecimals = 0,
  32. bool addPercentSign = true,
  33. double spacing = 8.0,
})

Creates a circular percent indicator widget.

Implementation

// ignore: sort_constructors_first
const CircularPercentIndicator({
  super.key,
  this.percent = 0.0,
  this.radius = 50.0,
  this.lineWidth = 5.0,
  this.backgroundWidth,
  this.progressColor = Colors.blue,
  this.backgroundColor = const Color(0xFFE0E0E0),
  this.linearGradient,
  this.backgroundGradient,
  this.fillColor = false,
  this.circleColor,
  this.circularStrokeCap = CircularStrokeCap.round,
  this.startAngle = CircularStartAngle.top,
  this.reverse = false,
  this.animation = false,
  this.animationDuration = const Duration(milliseconds: 500),
  this.animationCurve = Curves.easeInOut,
  this.center,
  this.header,
  this.footer,
  this.rotateLinearGradient = false,
  this.onAnimationEnd,
  this.restartAnimation = false,
  this.arcType,
  this.arcBackgroundColor,
  this.animateFromLastPercent = false,
  this.child,
  this.childPosition = CircularChildPosition.center,
  this.showPercentage = false,
  this.percentageTextStyle,
  this.percentageDecimals = 0,
  this.addPercentSign = true,
  this.spacing = 8.0,
}) : assert(percent >= 0.0 && percent <= 1.0,
          'Percent must be between 0.0 and 1.0');