FlowPlayer class

Manage behaviour of audio player

Constructors

FlowPlayer({AudioPlayer? mockedAudioPlayer, LoopMode loopMode = LoopMode.off, double volume = 1})
mockedAudioPlayer is audioPlayer used Useful for testing

Properties

hashCode int
The hash code for this object.
no setterinherited
loopMode → LoopMode
AudioPlayer loopMode Useful for make music loop infinite
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
volume double
Volume used for current player Updated at every play call
getter/setter pair

Methods

loadAsset(String asset) Future<void>
Load audio from app assets asset need to have full assets path
loadUrl(String url) Future<void>
Load audio from url (network) Stop current playing audio if any
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() Future<void>
Pause current audio played
play() Future<void>
Play current loaded audio Update configuration (volume and loopMode)
restart() Future<void>
Restart current loaded audio Useful for effect like click sound that have to be played multiple time
setVolume(double volume) Future<void>
Set volume of current flow Only updated when calling play method
stop() Future<void>
Stop current audio played
toString() String
A string representation of this object.
inherited

Operators

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