2

I want to retrieve all the collections except one document id. I have following query it will get all data by validating collection field. however i want to get all data except one document.

await Firestore.instance.collection('tbl').where('id',isEqualTo:textId).getDocuments().then(
        (data){
          dataRowCount= data.documents.length;
        }
      ); 
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
Sam
  • 46
  • 4

1 Answers1

2

Firestore doesn't offer any way to exclude documents from a query. You must can only filter for known values that you're looking for, or ranges of values. If you want to skip a document, you will have to check the query results in your code and omit the one you don't want

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441