WaveStyle constructor
const
WaveStyle({
- Color waveColor = Colors.blueGrey,
- bool showMiddleLine = true,
- double spacing = 8.0,
- bool showTop = true,
- bool showBottom = true,
- double? bottomPadding,
- StrokeCap waveCap = StrokeCap.round,
- Color middleLineColor = Colors.redAccent,
- double middleLineThickness = 3.0,
- double waveThickness = 3.0,
- bool showDurationLabel = false,
- bool extendWaveform = false,
- Color backgroundColor = Colors.black,
- bool showHourInDuration = false,
- double durationLinesHeight = 16.0,
- TextStyle durationStyle = const TextStyle(color: Colors.red, fontSize: 16.0),
- double? extraClipperHeight,
- double labelSpacing = 16.0,
- double durationTextPadding = 20.0,
- Color durationLinesColor = Colors.blueAccent,
- Shader? gradient,
- double scaleFactor = 20.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 = 20.0,
}) : assert(waveThickness < spacing,
"waveThickness can't be greater than spacing");