getPainter method

  1. @override
Painter getPainter(
  1. Animation<double> animation
)
override

Returns a Painter object that will paint the background.

Implementation

@override
Painter getPainter(Animation<double> animation) {
  switch (shape) {
    case ScrollerShape.stripes:
      return ScrollerPainterStripes(
        animation: animation,
        data: this,
      );
    case ScrollerShape.circles:
      return ScrollerPainterCircles(
        animation: animation,
        data: this,
      );
    case ScrollerShape.squares:
      return ScrollerPainterSquares(
        animation: animation,
        data: this,
      );
    case ScrollerShape.diamonds:
      return ScrollerPainterDiamonds(
        animation: animation,
        data: this,
      );
  }
}