BasicAudioSlider class

A custom audio slider widget that renders waveform bars with a draggable thumb.

Displays audio progress over a waveform visualization, with support for different thumb shapes, customizable colors, and animated bar entrance.

Premium UX features:

  • Thumb scales up with a spring animation when grabbed
  • Subtle glow and shadow expand during drag
  • Waveform bars near the thumb "lift" for a magnetic feel
  • Haptic feedback on grab, release, and tap-to-seek
Inheritance

Constructors

BasicAudioSlider({Key? key, required double value, required double max, required ValueChanged<double> onChanged, required VoidCallback onChangeStart, required VoidCallback onChangeEnd, required List<double> waveformData, Color? activeColor, Color? inactiveColor, Color? thumbColor, double height = 20.0, double thumbSize = 20.0, ThumbShape thumbShape = ThumbShape.circle, double barWidth = 4.0, double barSpacing = 1.0, double animationProgress = 1.0})
Creates a BasicAudioSlider.
const

Properties

activeColor → Color?
Color for the played portion of the waveform.
final
animationProgress → double
Progress of the waveform entrance animation (0.0–1.0).
final
barSpacing → double
Spacing between waveform bars.
final
barWidth → double
Width of each waveform bar.
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
Height of the slider.
final
inactiveColor → Color?
Color for the unplayed portion of the waveform.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
max → double
Maximum value (total duration) in milliseconds.
final
onChanged → ValueChanged<double>
Called when the user drags the slider.
final
onChangeEnd → VoidCallback
Called when the user stops dragging.
final
onChangeStart → VoidCallback
Called when the user starts dragging.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
thumbColor → Color?
Color of the draggable thumb.
final
thumbShape → ThumbShape
Shape of the thumb.
final
thumbSize → double
Diameter of the thumb.
final
value → double
Current playback value in milliseconds.
final
waveformData → List<double>
Bar heights for the waveform visualization.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<BasicAudioSlider>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

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