Try this code. In this code snippet, get download URL task is done asynchronously.
final List<String> videoUrls = [];
final result = await FirebaseStorage.instance.ref().listAll();
result.items.forEach((Reference ref) async {
await ref.getDownloadURL().then((value) {
String val = value.toString();
print(val);
videoUrls.add(val);
});
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…