Directory getCurrentDirectory() => _Directory. current ; Flutter.
Read moreHow do I read a directory in flutter?
To list all the files or folders, you have to use flutter_file_manager, path, and path_provider_ex flutter package . Add the following lines in your pubspec. yaml file to add this package in your dependency. Add read / write permissions in your android/app/src/main/AndroidManifest.
Read more