I use FilePicker.platform.pickFiles()
to let the user pick an audio file from the device.
this results in a PlatformFile
and i can use the identifier for the AudioPlayer
FilePicker.platform.pickFiles().then((result) {
if (result != null) {
PlatformFile file = result.files.first;
audioPlayer.setURL(file.identifier!);
}
});
Now this works fine(i will add a check for audio-file later), but if i store the identifier somehow, and load it again after a restart, it doesn’t work anymore. Is there a way to get a path that will still work after restarting the app?