getPainter method
Returns a Painter object that will paint the background.
Implementation
@override
Painter getPainter(Animation<double> animation) {
switch (shape) {
case ScrollerShape.circles:
return ScrollerPainterCircles(
animation: animation,
data: this,
);
case ScrollerShape.diamonds:
return ScrollerPainterDiamonds(
animation: animation,
data: this,
);
case ScrollerShape.squares:
return ScrollerPainterSquares(
animation: animation,
data: this,
);
case ScrollerShape.stripes:
return ScrollerPainterStripes(
animation: animation,
data: this,
);
case ScrollerShape.stripesDiagonalBackward:
return ScrollerPainterStripesDiagonalBackward(
animation: animation,
data: this,
);
case ScrollerShape.stripesDiagonalForward:
return ScrollerPainterStripesDiagonalForward(
animation: animation,
data: this,
);
}
}