WavePainter constructor

WavePainter({
  1. required Animation<double> animation,
  2. required WavePainterData data,
})

Creates a WavePainter object.

This is the painter for wave animations.

Implementation

WavePainter({
  required super.animation,
  required this.data,
}) : super(repaint: animation) {
  if (data.waves.isEmpty) {
    throw const EmptyWaveListException('`waves` cannot be empty.');
  }
}