Skip to content
Advertisement

Accessing Files from User Device using Flutter or Python

I am making a music player with flutter so, I wanna to ask how to access all the files of a particular extension ( mp3, wav ) with it’s details in Flutter or if not in Flutter then Python to play those music files with details like song name, author name

Advertisement

Answer

In python, you can basically do:

JavaScript

By doing this you can get the file name with .mp3/wav extension. Otherwise you can use glob library:

JavaScript

By using glob also output is same!

For getting artists and other metadata you can use songdetails library:

JavaScript

For more information visit songdetails github page.

If this answer helps you to solve your problem then, don’t forget to mark this as accepted answer.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement