Reputation: 53
I am trying to add background music on my flutter app . I installed the audioplayer plugin but am unable to set a background music which runs on loop and i also want to pause it too . Help would be appreciated
Upvotes: 1
Views: 5049
Reputation: 980
If you're looking for a background music for your app (not an audio player) then check out
Flutter Flame Engine 🔥
apart for 2D gaming engine, it also gives you ability to play background music (configurable) and short sounds for taps.
Upvotes: 2
Reputation: 1379
You might want to check this code which uses the assets_audio_player package.
You can use the initState
function to play the music on a loop.
Upvotes: 0