skip to Main Content

Stream<QuerySnapshot> getAllLists() with Async – Flutter

My function looks like this: Stream<QuerySnapshot> getAllLists() { late String temp = "name"; getUserSortMethod().then((value) => { temp = value.toString(), // temp is now "prio" }); return firestore .collection('lists') .where('editors', arrayContains: currentUser.email) .orderBy(temp, descending: false) .snapshots(); } I need to wait…

VIEW QUESTION

Flutter error type 'List<Object?>' is not a subtype of type 'List<String>'

I have this list: List<dynamic> activityDays = []; And this code: getItems(AsyncSnapshot<QuerySnapshot> snapshot) { if (widget.user.uid.isNotEmpty) { // ignore: missing_return snapshot.data.documents.map<Column>((f) { if (f.documentID == widget.currentList.keys.elementAt(widget.i)) { f.data.forEach((a, b) { if (a == "activities") { List<dynamic> markMap = f.data['activities']; for…

VIEW QUESTION
Back To Top
Search