vendredi 12 mars 2021

Flutter and Firestore: How can I get the document Id from the add function?

I added a document to Firestore. How can I get the document Id of my added document? I want to save it to a variable.

Btw. I'm using this for a web app if this Is important.

FirebaseFirestore.instance.collection('room').add({
    'name': _name,
    'points': 0,
});



Aucun commentaire:

Enregistrer un commentaire