WaveStyle constructor

const WaveStyle({
  1. Color waveColor = Colors.blueGrey,
  2. bool showMiddleLine = true,
  3. double spacing = 8.0,
  4. bool showTop = true,
  5. bool showBottom = true,
  6. double? bottomPadding,
  7. StrokeCap waveCap = StrokeCap.round,
  8. Color middleLineColor = Colors.redAccent,
  9. double middleLineThickness = 3.0,
  10. double waveThickness = 3.0,
  11. bool showDurationLabel = false,
  12. bool extendWaveform = false,
  13. Color backgroundColor = Colors.black,
  14. bool showHourInDuration = false,
  15. double durationLinesHeight = 16.0,
  16. TextStyle durationStyle = const TextStyle(color: Colors.red, fontSize: 16.0),
  17. double? extraClipperHeight,
  18. double labelSpacing = 16.0,
  19. double durationTextPadding = 20.0,
  20. Color durationLinesColor = Colors.blueAccent,
  21. Shader? gradient,
  22. double scaleFactor = 1.0,
})

A model class to provide style to the waveforms.

Implementation

const WaveStyle({
  this.waveColor = Colors.blueGrey,
  this.showMiddleLine = true,
  this.spacing = 8.0,
  this.showTop = true,
  this.showBottom = true,
  this.bottomPadding,
  this.waveCap = StrokeCap.round,
  this.middleLineColor = Colors.redAccent,
  this.middleLineThickness = 3.0,
  this.waveThickness = 3.0,
  this.showDurationLabel = false,
  this.extendWaveform = false,
  this.backgroundColor = Colors.black,
  this.showHourInDuration = false,
  this.durationLinesHeight = 16.0,
  this.durationStyle = const TextStyle(
    color: Colors.red,
    fontSize: 16.0,
  ),
  this.extraClipperHeight,
  this.labelSpacing = 16.0,
  this.durationTextPadding = 20.0,
  this.durationLinesColor = Colors.blueAccent,
  this.gradient,
  this.scaleFactor = 1.0,
}) : assert(waveThickness < spacing,
          "waveThickness can't be greater than spacing");