skip to Main Content

Type 'Future<QuerySnapshot<Map<String, dynamic>>>' is not a subtype of type 'DocumentSnapshot<Object?>' in type cast – Flutter

static CollectionReference doses = FirebaseFirestore.instance.collection('Doses'); void setDoseDetails( TextEditingController endController, TextEditingController startController, TextEditingController doseController, int noPills, int doseRep) { var dose = doses.where('userID', isEqualTo: Auth().uID).get() as DocumentSnapshot; Map<String, dynamic> userData = dose as Map<String, dynamic>; endController.text = userData['endDate']; startController.text = userData['startDate'];…

VIEW QUESTION
Back To Top
Search