ScrollerPainter constructor
ScrollerPainter({
- required Animation<
double> animation, - required ScrollerPainterData data,
Creates a ScrollerPainter object.
This is the painter for animating shapes moving around the screen.
Implementation
ScrollerPainter({
required super.animation,
required this.data,
}) : super(repaint: animation) {
if (data.shapeWidth <= 0.0) {
throw IllegalShapeSizeException(
'`shapeWidth` must be greater than 0\nActual value: ${data.shapeWidth}',
);
}
if (data.spaceBetweenShapes < 0.0) {
throw IllegalShapeSizeException(
'`spaceBetweenShapes` cannot be negative.\nActual value: '
'${data.spaceBetweenShapes}',
);
}
}