delete all documents matching query flutter cloud firestore code example
Example: delete all documents from collection flutter firestore
//Dart
firestore.collection('messages').getDocuments().then((snapshot) {
for (DocumentSnapshot ds in snapshot.documents){
ds.reference.delete();
});
});