MiniAudio class

MiniAudio - A widget that displays a mini audio card with customizable audio information.

This widget provides an overlay for audio tracks, displaying a customizable name, optional waveform animation, and image background. It supports drag-and-drop positioning on the screen and allows for visual customization of waveform and image.

Parameters:

  • options (MiniAudioOptions): The configuration options for the widget.

Structure:

  • Displays the widget as a draggable overlay with the following elements:
    • Background image (optional) - Loaded from the specified URL or falls back to initials.
    • Audio waveform (optional) - An animated series of bars, shown based on showWaveform.
    • Audio name - Displayed as a semi-transparent overlay at the top.

Example Usage:

MiniAudio(
  options: MiniAudioOptions(
    name: "Now Playing",
    showWaveform: true,
    barColor: Colors.green,
  ),
);

Notes:

  • The waveform animation is randomly generated to give a dynamic visual effect.
Inheritance

Constructors

MiniAudio({Key? key, required MiniAudioOptions options})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
options MiniAudioOptions
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _MiniAudioState
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}) 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