Код: Выделить всё
Future downloadFiles(url) async {
var result = await getDirectories(url); //this function just returns the path in firestore storage
Directory appDocDir = await getApplicationDocumentsDirectory();
result.items.forEach((firebase_storage.Reference ref) async {
File downloadToFile = File('${appDocDir.path}/notes/${ref.name}');
try {
await firebase_storage.FirebaseStorage.instance
.ref(ref.fullPath)
.writeToFile(downloadToFile);
} on firebase_core.FirebaseException catch (e) {
print(e);
}
});
Подробнее здесь: https://stackoverflow.com/questions/681 ... al-storage