Created
June 24, 2020 13:13
-
-
Save Anirudhk07/bfc2075bba24cce47376cf07cdc8cb6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Firestore.instance | |
.collection("images") | |
.where("name", isEqualTo: "travelimage4") | |
.getDocuments() | |
.then((res) { | |
res.documents.forEach((result) { | |
FirebaseStorage.instance | |
.getReferenceFromUrl(result.data["url"]) | |
.then((res) { | |
res.delete().then((res) { | |
print("Deleted!"); | |
}); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
como podría reemplaza => .where("name", isEqualTo: "travelimage4") para no tener que especifiar el "travelimage4" gracias