PlayingAudio class

Represents the current played audio asset When the player opened a song, it will ping AssetsAudioPlayer.current with a AssetsAudio

Example

final assetAudio = AssetsAudio(
  assets/audios/song1.mp3,
)

_assetsAudioPlayer.current.listen((PlayingAudio current){
    //ex: retrieve the current song's total duration
});

_assetsAudioPlayer.open(assetAudio);
Annotations

Constructors

PlayingAudio({required Audio audio, Duration duration = Duration.zero})
const

Properties

assetAudioPath String
no setter
audio Audio
the opened asset
final
duration Duration
the current song's total duration
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override