CircularIndicatorPainter constructor

CircularIndicatorPainter({
  1. required int currentPage,
  2. required double pageDelta,
  3. required int itemCount,
  4. double radius = 12,
  5. double borderWidth = 2,
  6. required Color currentIndicatorColor,
  7. required Color indicatorBackgroundColor,
  8. Color? indicatorBorderColor,
})

Implementation

CircularIndicatorPainter({
  required this.currentPage,
  required this.pageDelta,
  required this.itemCount,
  this.radius = 12,
  double borderWidth = 2,
  required Color currentIndicatorColor,
  required Color indicatorBackgroundColor,
  this.indicatorBorderColor,
}) {
  indicatorPaint.color = indicatorBackgroundColor;
  indicatorPaint.style = PaintingStyle.fill;
  indicatorPaint.isAntiAlias = true;
  currentIndicatorPaint.color = currentIndicatorColor;
  currentIndicatorPaint.style = PaintingStyle.fill;
  currentIndicatorPaint.isAntiAlias = true;

  if (indicatorBorderColor != null) {
    borderIndicatorPaint.color = indicatorBorderColor!;
    borderIndicatorPaint.style = PaintingStyle.stroke;
    borderIndicatorPaint.strokeWidth = borderWidth;
    borderIndicatorPaint.isAntiAlias = true;
  }
}