CirclePainter constructor
CirclePainter({
- double? circleWidth,
- double? progress,
- required double radius,
- GFProgressHeadType? progressHeadType,
- Color? progressBarColor,
- Color? backgroundColor,
- double circleStartAngle = 0.0,
- LinearGradient? linearGradient,
- bool? reverse,
- Color? arcBackgroundColor,
- MaskFilter? mask,
Implementation
CirclePainter(
{this.circleWidth,
this.progress,
required this.radius,
this.progressHeadType,
this.progressBarColor,
this.backgroundColor,
this.circleStartAngle = 0.0,
this.linearGradient,
this.reverse,
this.arcBackgroundColor,
this.mask}) {
_paintBackground.color = backgroundColor ?? Colors.transparent;
_paintBackground.style = PaintingStyle.stroke;
_paintBackground.strokeWidth = circleWidth ?? 0.0;
_paintLine.color = progressBarColor ?? Colors.transparent;
_paintLine.style = PaintingStyle.stroke;
_paintLine.strokeWidth = circleWidth ?? 0.0;
if (progressHeadType == GFProgressHeadType.circular) {
_paintLine.strokeCap = StrokeCap.round;
} else if (progressHeadType == GFProgressHeadType.square) {
_paintLine.strokeCap = StrokeCap.square;
}
}