📜  如何在颤动中加载文件夹 - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:47.913000             🧑  作者: Mango

代码示例1
List _folders;
Future getDir() async {
  final directory = await getApplicationDocumentsDirectory();
  final dir = directory.path;
  String pdfDirectory = '$dir/';
  final myDir = new Directory(pdfDirectory);
  setState(() {
    _folders = myDir.listSync(recursive: true, followLinks: false);
  });
  print(_folders);
}