ActiveWaveformPainter constructor
ActiveWaveformPainter({
- required Color color,
- required Gradient? gradient,
- required double sampleWidth,
- required List<
double> activeSamples, - required WaveformAlignment waveformAlignment,
- PaintingStyle style = PaintingStyle.stroke,
- double borderWidth = 0.0,
- Color borderColor = opaqueBlack,
Implementation
ActiveWaveformPainter({
required Color color,
required Gradient? gradient,
// Do we really need to pass the samples here?. I believe
// [ActiveWaveformPainter] should only care about the [activeSamples] value.
// If [samples] changes, then [activeSamples] should change as well so it's
// redundant to check for [samples] equality and to pass them here.
// Only if ActiveWaveformPainter depends on samples in future for any
// reasons, then we should pass them here.
// required List<double> samples,
required double sampleWidth,
required this.activeSamples,
required WaveformAlignment waveformAlignment,
PaintingStyle style = PaintingStyle.stroke,
this.borderWidth = 0.0,
this.borderColor = opaqueBlack,
}) : super(
samples: [], //samples,
color: color,
gradient: gradient,
waveformAlignment: waveformAlignment,
sampleWidth: sampleWidth,
style: style,
);