buildPainter method

  1. @override
BasicIndicatorPainter buildPainter(
  1. int count,
  2. double offset
)
override

Builds a new painter every time the page offset changes

Implementation

@override
BasicIndicatorPainter buildPainter(int count, double offset) {
  if (fixedCenter) {
    assert(
      offset.ceil() < count,
      'ScrollingDotsWithFixedCenterPainter does not support infinite looping.',
    );
    return ScrollingDotsWithFixedCenterPainter(
      count: count,
      offset: offset,
      effect: this,
    );
  } else {
    return ScrollingDotsPainter(
      count: count,
      offset: offset,
      effect: this,
    );
  }
}