CircularPercentIndicator constructor
const
CircularPercentIndicator({
- Key? key,
- double percent = 0.0,
- double radius = 50.0,
- double lineWidth = 5.0,
- double? backgroundWidth,
- Color progressColor = Colors.blue,
- Color backgroundColor = const Color(0xFFE0E0E0),
- Gradient? linearGradient,
- Gradient? backgroundGradient,
- bool fillColor = false,
- Color? circleColor,
- CircularStrokeCap circularStrokeCap = CircularStrokeCap.round,
- CircularStartAngle startAngle = CircularStartAngle.top,
- bool reverse = false,
- bool animation = false,
- Duration animationDuration = const Duration(milliseconds: 500),
- Curve animationCurve = Curves.easeInOut,
- Widget? center,
- Widget? header,
- bool rotateLinearGradient = false,
- VoidCallback? onAnimationEnd,
- bool restartAnimation = false,
- ArcType? arcType,
- Color? arcBackgroundColor,
- bool animateFromLastPercent = false,
- Widget? child,
- CircularChildPosition childPosition = CircularChildPosition.center,
- bool showPercentage = false,
- TextStyle? percentageTextStyle,
- int percentageDecimals = 0,
- bool addPercentSign = true,
- 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');