buildPainter method
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,
);
}
}