To read a single document, we can use DocumentReference’s get() method that returns a Task<DocumentSnapshot> , while reading multiple documents from a collection or Query, we can use Firestore Query’s get() method that returns an object of type Task<QuerySnapshot>. Both methods read the data only once.
Read moreHow do I retrieve data from Firebase firestore in flutter?
Call the getDocs() function, then use the build function, then print all the document IDs in the console . Here is how you do it! Get all data from the collection that you found working, without using deprecated methods.
Read more