I'm building an e-commerce app but when I query firestore to retrieve data I get documents length 0. Data Is present in Firestore. I have no idea what is causing this issue.
I have added all the dependencies.
Firestore.instance
.collection('Products')
.getDocuments().then((value) => print(value.documents.length));
Why this query is not giving me a total number of documents inside Products.
When I run this Query I get a Correct number of documents inside Fruits.
Firestore.instance
.collection('Products')
.document('ABHISHAK FRUITS').collection('Fruits').getDocuments().then((value) => print(value.documents.length));
