How do I get document ID after adding to a collection?

When you call the . add method on a collection, a DocumentReference object is returned. DocumentReference has the id field, so you can get the id after the document was created .

Sizin İçin Seçtik  How do you delete a document on firestore?

Leave a Reply

Your email address will not be published. Required fields are marked *

How do I get document ID after adding to a collection?

When you call the . add method on a collection, a DocumentReference object is returned. DocumentReference has the id field, so you can get the id after the document was created .

Sizin İçin Seçtik  How do I add data to firestore database in flutter?

Leave a Reply

Your email address will not be published. Required fields are marked *