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, bool enableVolumeSlicerControl = false, Color? progressBarColor, Color? inactiveTrackColor, TextStyle? timeTextStyle, Color? playPauseIconColor, Color? textColor, IconData playIcon = Icons.play_arrow, IconData pauseIcon = Icons.pause, double progressBarHeight = 5.0, EdgeInsetsGeometry controlsPadding = const EdgeInsets.all(12.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
controlsPadding → EdgeInsetsGeometry
Outer padding around the audio player surface and controls.
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
enableVolumeSlicerControl → bool
Wether to show volume slicer control
final
hashCode → int
The hash code for this object.
no setterinherited
inactiveTrackColor → Color?
final
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
timeTextStyle → TextStyle?
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