Delete a collection if empty Firestore

Viewed 35

Is there any way to delete the collection if there are no docs in it with flutter? There are some cases when the 'visited' collection could be empty and in this case I don't need it anymore...

enter image description here

1 Answers

There are no empty collections in Firestore. If there is no document in a collection it won't show up in the console. It seems you deleted the documents while the console was open and that's why you can see an empty collection. I just checked that and confirmed it. Refreshing the console should remove it from the list.

enter image description here

Related