CycleProgressBar constructor

CycleProgressBar({
  1. Key? key,
  2. double percent = 0.0,
  3. double lineWidth = 5.0,
  4. double startAngle = 0.0,
  5. required double radius,
  6. Color fillColor = Colors.transparent,
  7. Color backgroundColor = const Color(0xFFB8C7CB),
  8. Color? progressColor,
  9. double backgroundWidth = -1,
  10. LinearGradient? linearGradient,
  11. bool animation = false,
  12. int animationDuration = 500,
  13. Widget? header,
  14. Widget? footer,
  15. Widget? center,
  16. bool addAutomaticKeepAlive = true,
  17. CircularStrokeCap circularStrokeCap = CircularStrokeCap.butt,
  18. Color? arcBackgroundColor,
  19. ArcType? arcType,
  20. bool animateFromLastPercent = false,
  21. bool reverse = false,
  22. Curve curve = Curves.linear,
  23. MaskFilter? maskFilter,
  24. bool restartAnimation = false,
  25. VoidCallback? onAnimationEnd,
  26. Widget? widgetIndicator,
  27. bool rotateLinearGradient = false,
  28. Color? progressBorderColor,
})

Implementation

CycleProgressBar({
  Key? key,
  this.percent = 0.0,
  this.lineWidth = 5.0,
  this.startAngle = 0.0,
  required this.radius,
  this.fillColor = Colors.transparent,
  this.backgroundColor = const Color(0xFFB8C7CB),
  Color? progressColor,
  this.backgroundWidth = -1,
  this.linearGradient,
  this.animation = false,
  this.animationDuration = 500,
  this.header,
  this.footer,
  this.center,
  this.addAutomaticKeepAlive = true,
  this.circularStrokeCap = CircularStrokeCap.butt,
  this.arcBackgroundColor,
  this.arcType,
  this.animateFromLastPercent = false,
  this.reverse = false,
  this.curve = Curves.linear,
  this.maskFilter,
  this.restartAnimation = false,
  this.onAnimationEnd,
  this.widgetIndicator,
  this.rotateLinearGradient = false,
  this.progressBorderColor,
}) : assert(percent >= 0.0 && percent <= 1.0, 'percent must be between 0.0 and 1.0'),
     assert(radius > 0, 'radius must be greater than 0'),
     assert(lineWidth > 0, 'lineWidth must be greater than 0'),
     assert(startAngle >= 0.0, 'startAngle must be non-negative'),
     assert(animationDuration > 0, 'animationDuration must be greater than 0'),
     assert(linearGradient == null || progressColor == null,
            'Cannot set both linearGradient and progressColor'),
     assert(arcType != null || arcBackgroundColor == null,
            'arcBackgroundColor requires arcType to be set'),
     super(key: key) {
  _progressColor = progressColor ?? Colors.red;
}