buildPainter method

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

Builds a new painter every time the page offset changes

Implementation

@override
IndicatorPainter buildPainter(int count, double offset) {
  assert(
    offset.ceil() < count,
    'SwapEffect does not support infinite looping.',
  );
  return SwapPainter(count: count, offset: offset, effect: this);
}