Following the Flutter Create challenge, I thought it would be a create time for reflection and share knowledge about some of the challenges I faced and how I solved these challenge. One of these was adding music to my app.

After discovering the Flutter SDK doesn’t have support for playing audio / music I searched through all of the available packages which were music related on pub.dev and found the following 6.

assets_audio_player Audio Player / Audio Players / Audio Player 2 Flute Music Player Fluttery Audio Stereo Music Player

Trying to find a music plugin, not so tough. Trying to find a music plugin which worked on both Android AND iOS? A bit more challenging.

To save you from having to go off and do the research yourself, I’ve decided to share a quick example to play music with each package and listed the issues I ran into.

If you want to quickly skip to the end — you’ll find a table where I’ve summarised key findings for each package. I’ve listed if they support Android and/or iOS, if they support playing remote hosted music files, if they support internal device music files and finally if they support playing music files from your Flutter project’s assets directory.

Want to thank me? Showing your appreciation for this package by clapping on Medium and sharing it would be greatly appreciated!