# The audio library is just_audio final player = AudioPlayer(); var duration = await player.setUrl('audio_file.mp3');