copyWith method
Returns a copy of this object with its field values replaced by the ones provided to this method.
Implementation
@override
WavePainterData copyWith({
List<Wave>? waves,
}) {
return WavePainterData(
waves: waves ?? _waves.map((wave) => wave.copy()).toList(),
);
}