说我有电影,ifont,歌曲,图像,whatsapp等文件夹
Say I have folders like movies, ifont, song, images, whatsapp, etc
在我的外部存储设备上,我想访问上述任何文件夹中的文件并使用flutter存储到列表。
On my External storage, I want to access files from any of the folders above and store to a list using flutter.
我已经向android.xml 添加了必要的权限,但是对于如何进一步发展,我一无所知, 感谢代码段。
I already added the necessary permissions to android.xml But I am clueless on how to go further from there, I would appreciate a code snippet.
谢谢。
推荐答案您可以使用 listSync 以获得子目录和文件的列表,您将获得 FileSystemEntity 。您还需要对外部存储进行权限管理,因此请使用插件
you can use listSync to get the list of sub-directories and files and you will get a list of FileSystemEntity.you also need to get persmmison to external storage so use this plugin
- 查看此问题也
- check out this Question also
更多推荐
如何使用flutter访问android中的特定文件夹?
发布评论