ActiveWaveformPainter constructor

ActiveWaveformPainter({
  1. required Color color,
  2. required Gradient? gradient,
  3. required double sampleWidth,
  4. required List<double> activeSamples,
  5. required WaveformAlignment waveformAlignment,
  6. PaintingStyle style = PaintingStyle.stroke,
  7. double borderWidth = 0.0,
  8. 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,
      );