AudioControlsConfiguration class

Configuration for audio player controls

This class holds various settings and customizations for audio player controls.

Constructors

AudioControlsConfiguration({bool enablePlayPause = true, bool enableProgressBar = true, bool enableProgressText = true, bool enableVolumeControl = false, bool enableSpeedControl = false, Color? progressBarColor, Color? playPauseIconColor, Color? textColor, IconData playIcon = Icons.play_arrow, IconData pauseIcon = Icons.pause, double progressBarHeight = 5.0, Widget playPauseBuilder(AudioPlayer player, VoidCallback onTap)?, Widget progressBarBuilder(AudioPlayer player, Duration current, Duration total)?, Widget timeTextBuilder(AudioPlayer player, Duration current, Duration total)?, Widget? audioPlayingStateWidget, Widget? audioDefaultStateWidget, bool useDefaultControls = true})
const

Properties

audioDefaultStateWidget Widget?
Custom widget for default state
final
audioPlayingStateWidget Widget?
Custom widget for playing state
final
enablePlayPause bool
Whether to show play/pause button
final
enableProgressBar bool
Whether to show progress bar
final
enableProgressText bool
Whether to show progress text (current time / total duration)
final
enableSpeedControl bool
Whether to show speed control button
final
enableVolumeControl bool
Whether to show volume control
final
hashCode int
The hash code for this object.
no setterinherited
pauseIcon IconData
final
playIcon IconData
Icons for play/pause buttons (can be customized)
final
playPauseBuilder Widget Function(AudioPlayer player, VoidCallback onTap)?
Custom widget builders
final
playPauseIconColor Color?
final
progressBarBuilder Widget Function(AudioPlayer player, Duration current, Duration total)?
Custom progress bar builder
final
progressBarColor Color?
Custom colors for controls
final
progressBarHeight double
Progress bar height
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textColor Color?
final
timeTextBuilder Widget Function(AudioPlayer player, Duration current, Duration total)?
Custom time text builder
final
useDefaultControls bool
Whether to use the built-in default controls
final

Methods

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