I am new at flutter with firebase so if this feels like a question which has been answered in the docs or by other questions, I apologize!!
Now I am saving user data in firestore and when a user deletes their account, I want that to be deleted too but the Firestore docs says that the only way to delete a collection us:
To delete an entire collection or subcollection in Cloud Firestore, retrieve all the documents within the collection or subcollection and delete them.
This is not recommended for native devs but I thought of an idea:
So firestore overwrites new data against the old one, so if we set a new collection (user-root) which has a single doc with no fields and then delete it, it would be read/write effective as it just overwrites all of the preexisting data.
I have not tried this idea out but if anyone has a better approach to delete collections in firestore, please write an answer!
Reference Links: