Skip to content

Instantly share code, notes, and snippets.

@Anirudhk07
Created June 24, 2020 13:13
Show Gist options
  • Save Anirudhk07/bfc2075bba24cce47376cf07cdc8cb6b to your computer and use it in GitHub Desktop.
Save Anirudhk07/bfc2075bba24cce47376cf07cdc8cb6b to your computer and use it in GitHub Desktop.
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!");
});
});
});
});
@LuzCampos
Copy link

como podría reemplaza => .where("name", isEqualTo: "travelimage4") para no tener que especifiar el "travelimage4" gracias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment