CirclePainter constructor

CirclePainter({
  1. double? circleWidth,
  2. double? progress,
  3. required double radius,
  4. GFProgressHeadType? progressHeadType,
  5. Color? progressBarColor,
  6. Color? backgroundColor,
  7. double circleStartAngle = 0.0,
  8. LinearGradient? linearGradient,
  9. bool? reverse,
  10. Color? arcBackgroundColor,
  11. 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;
  }
}