颤振中加载本地视频路径时出错



我有一个从本地路径加载视频文件的提议,该路径的阿拉伯名称类似于Flutter:

/var/mobile/Channels/Data/Application/Local/Documents/بناء_

有人能帮我吗?

使用Flutter插件查找文件系统上常用的位置。支持iOS、Android、Linux和MacOS

Directory tempDir = await getTemporaryDirectory();
String tempPath = tempDir.path;
Directory appDocDir = await getApplicationDocumentsDirectory();
String appDocPath = appDocDir.path;

有关完整示例,请参阅此插件的示例应用程序。

一旦您将路径存储在变量中,您就可以在该路径中附加文件名,以访问文件系统中的任何文件

///Decode the path to utf-8 string
var url = utf8.decode("/var/mobile/Containers/Data/Application/Local/Documents/بناء_مشروع_فلتر.mp4");

最新更新