0

how do I append another QuerySnapshot to a QuerySnapshot?

static final CollectionReference _col = FirebaseFirestore.instance.collection('post');
            
    Stream<QuerySnapshot<Object?>> query = _col.where('firstReleaseDate', isLessThanOrEqualTo: Timestamp.now()).snapshots();
            
        
        QuerySnapshot ss = await _col
          .query() <-----append here
          .orderBy(field, descending: isDescending)
          .startAfterDocument(lastDoc)
          .limit(limit)
          .get()
          .timeout(TIMEOUT_DURATION);
phongyewtong
  • 5,085
  • 13
  • 56
  • 81
  • Are you trying to add additional query clauses like orderBy to original query conditionally? If yes, checkout https://stackoverflow.com/questions/56820548/flutter-cloud-firestore-query-using-multiple-conditional-where-clauses?rq=1 – Dharmaraj Feb 23 '22 at 17:00
  • Could you please share more information about what you are trying to achieve (even as an algorithm)? I was not able to find any similar cases. You might refer to [this](https://stackoverflow.com/questions/66759627/)? – Alex Feb 24 '22 at 00:28

0 Answers0