Answers for "how to remove a document firestore flutter"

0

delete all documents from collection flutter firestore

//Dart
firestore.collection('messages').getDocuments().then((snapshot) {
  for (DocumentSnapshot ds in snapshot.documents){
    ds.reference.delete();
  });
});
Posted by: Guest on May-12-2021
0

delete a document flutter

Firestore.instance.collection("chats").document("ROOM_1")  
    .collection("messages").document(snapshot.data.documents[index]["id"])
    .delete();
Posted by: Guest on August-30-2021

Code answers related to "how to remove a document firestore flutter"

Code answers related to "Dart"

Browse Popular Code Answers by Language