ScrollerPainterSquares constructor

ScrollerPainterSquares({
  1. required Animation<double> animation,
  2. required ScrollerPainterData data,
})

Creates a ScrollerPainterSquares object.

This is the painter for animating squares moving around the screen.

Implementation

ScrollerPainterSquares({required super.animation, required super.data}) {
  if (!identical(data.shape, ScrollerShape.squares)) {
    throw MismatchedPainterAndDataException(
      'The provided data is not compatible with this painter. Invalid shape.',
      this,
      data,
    );
  }
}