MiniAudioOptions class
MiniAudioOptions
- Configuration options for the MiniAudio
widget.
Properties:
visible
(bool
): Controls the visibility of theMiniAudio
widget (default istrue
).customStyle
(Map<String, dynamic>
): Custom styles for the widget (default is an empty map).name
(String
): The name of the audio track, displayed at the top.showWaveform
(bool
): Toggles the display of a waveform animation (default isfalse
).overlayPosition
(String
): Sets the position of the overlay (default is 'topRight').barColor
(Color
): Color of the waveform bars (default isColor(0xFFF51C1C)
).textColor
(Color
): Color of the text displayed on the widget (default isColor(0xFF181818)
).nameTextStyling
(TextStyle
): Text style for the name (default is bold white text).imageSource
(String
): URL for the image to display as the background.roundedImage
(bool
): Sets the image as rounded iftrue
(default isfalse
).imageStyle
(Map<String, dynamic>
): Additional styling options for the image.
Example Usage:
MiniAudio(
options: MiniAudioOptions(
name: "Sample Audio",
showWaveform: true,
imageSource: "https://example.com/image.jpg",
roundedImage: true,
),
);
Constructors
-
MiniAudioOptions({bool visible = true, Map<
String, dynamic> customStyle = const {}, required String name, bool showWaveform = false, String overlayPosition = 'topRight', Color barColor = const Color.fromARGB(255, 245, 28, 28), Color textColor = const Color.fromARGB(255, 24, 24, 24), TextStyle nameTextStyling = const TextStyle(color: Colors.white, fontWeight: FontWeight.bold), String imageSource = 'https://mediasfu.com/images/logo192.png', bool roundedImage = false, Map<String, dynamic> imageStyle = const {}})
Properties
- barColor → Color
-
final
-
customStyle
→ Map<
String, dynamic> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- imageSource → String
-
final
-
imageStyle
→ Map<
String, dynamic> -
final
- name → String
-
final
- nameTextStyling → TextStyle
-
final
- overlayPosition → String
-
final
- roundedImage → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showWaveform → bool
-
final
- textColor → Color
-
final
- visible → bool
-
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