繁体   English   中英

为什么 android 12 上的文件管理器没有显示我使用颤振创建的文件夹,路径提供程序包?

[英]why file manager on android 12 did not show the folder i have created using flutter,path provider package?

注意我使用了另一个文件管理器,我可以看到我创建的文件夹,但我不知道为什么它没有显示在原始文件管理器中。

代码

Future<String> getFilePath() async {
  Directory endPointDirectory=Directory("");
  const String folderName="cameraFlutter";// there folder where we will save files to it
  var directory=getExternalStorageDirectory()
      .then((value) async {
    final Directory endPointDirectory=Directory("${value!.path}/$folderName");
    if (await endPointDirectory.exists()) {
      print("exist");
      print(endPointDirectory.path);

    } else {
    //if the  folder not exists create folder and then return its path
      print("not exist");
      await endPointDirectory.create(recursive: true);

    }

  }).catchError((onError){
    print(onError.toString());

  });

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM