WaveformStyle class

Visual styling options for AudioWaveform.

Constructors

WaveformStyle({double height = 80.0, Color waveColor = const Color(0xFF4CAF50), Color? waveColorPlayed, Color backgroundColor = const Color(0xFF212121), Color? positionIndicatorColor, Color? centerLineColor, Color? playedOverlayColor, Color? unplayedOverlayColor, double barWidth = 3.0, double barSpacing = 1.0, double minBarHeight = 2.0, BorderRadius? borderRadius, bool showCenterLine = true, Duration animationDuration = const Duration(milliseconds: 300)})
Creates a WaveformStyle.
const

Properties

animationDuration → Duration
Animation duration for bar height transitions (streaming mode).
final
backgroundColor → Color
Background color of the waveform container.
final
barSpacing → double
Spacing between bars in pixels.
final
barWidth → double
Width of each waveform bar in pixels.
final
borderRadius → BorderRadius?
Border radius for the waveform container.
final
centerLineColor → Color?
Color of the center line (for stereo display). If null, uses waveColor with reduced opacity.
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
Height of the waveform widget in pixels.
final
minBarHeight → double
Minimum height for bars (ensures quiet sections are visible).
final
playedOverlayColor → Color?
Overlay color for the played portion (before position indicator). If null, no overlay is shown.
final
positionIndicatorColor → Color?
Color of the playback position indicator line. If null, uses waveColor.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showCenterLine → bool
Whether to show the center line for stereo waveforms.
final
unplayedOverlayColor → Color?
Overlay color for the unplayed portion (after position indicator). If null, no overlay is shown.
final
waveColor → Color
Color for the waveform bars (left channel in stereo).
final
waveColorPlayed → Color?
Color for the played portion of the waveform. If null, uses waveColor.
final

Methods

copyWith({double? height, Duration? animationDuration, Color? waveColor, Color? waveColorPlayed, Color? backgroundColor, Color? positionIndicatorColor, Color? centerLineColor, Color? playedOverlayColor, Color? unplayedOverlayColor, double? barWidth, double? barSpacing, double? minBarHeight, BorderRadius? borderRadius, bool? showCenterLine}) → WaveformStyle
Creates a copy of this style with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited