0

My code was working fine. As soon as I added isEqualTo, the app keeps on loading and loading.

I am guessing perhaps I do have to do something with RULES in FirebaseFirestore. Not sure though. And also I know nothing of rules.

StreamBuilder(
  stream: _firebaseFirestore
    .collection('wallpapers')
    .where('uploadedBy', isEqualTo: _user!.uid)
    .orderBy('date', descending: true)
    .snapshots(),
)
mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Nuaiman Ashiq
  • 69
  • 1
  • 5

1 Answers1

2

Inside your builder

if (snapShot.hasError) {
  print(snapShot.error);
  return new Text('Error: ${snapShot.error}');
}

then it will probably print you the link in which you will be able to build your index with. If that's not the case make sure there exists a data that satisfies your query.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Henok
  • 3,293
  • 4
  • 15
  • 36