How to get audio metadata from its path in flutter?
If you are using flutter_sound, there are utility methods which can give you the duration in milliseconds and some other metadata. From the package docs:
int duration = await flutterSoundHelper.duration( this._path[_codec.index] );Map<dynamic, dynamic> info = await flutterSoundHelper.FFmpegGetMediaInformation( uri );
You can use fluter_music_player plugin to play, pause, album artist, duration etc. It's support both ios and android.
See Flutter Music Player this sample Music player flutter project using this plugin