Что я сделал:
- Приложение имеет разрешения на чтение, запись и управление для Android.
- Введенная папка верна и содержит такие файлы, как изображения и PDF-файлы. >
Future getFolderHash(Directory folder) async {
try {
if (await folder.exists()) {
Get the list of all files and directories recursively
List entities = folder.listSync(recursive: true);
print(await folder.list().toList());
int fileCount = entities.whereType().length;
print(entities);
return fileCount;
else {
return 0;
}
} catch (e) {
print('Error: $e');
return 0;
}
}
Подробнее здесь: https://stackoverflow.com/questions/789 ... ndroid-app
Мобильная версия