FirebaseFirestore.instance
.collection("users")
.get()
.then((value) {
print(value.docs);
for (var element in value.docs) {
print(element.id);// you will get all ids here
}
});
If you want to upload one particular data from Firestore.
FirebaseFirestore.instance
.collection("users")
.where("uid",
isEqualTo: 'your_uid')
.get()
.then((value) {
print(value.docs);
for (var element in value.docs) {
print(element.id); // single id of that collection
}
});
2
Answers
To get all data from Firestore.
If you want to upload one particular data from Firestore.
I have tried this once….
check if this is the same u looking for