skip to Main Content

Flutter – How to get a list of documents from Cloud Firestore using dart cloud_firestore package

I made a function to read a the data from a specific document and it works(code below) Future<List<String>> getAllServicesFromDatabase()async{ List<String> services = []; FirebaseFirestore db = FirebaseFirestore.instance; DocumentSnapshot<Map<String, dynamic>> results = await db.collection(dbCollection).doc(servicesDocument).get(); if(results.data() != null){ Map<String,dynamic> fetchedData = results.data()!;…

VIEW QUESTION
Back To Top
Search