Closed Maadhav closed 3 years ago
I had the same issues, adding a key to the paginate firestore widget solved it.
PaginateFirestore(
key: UniqueKey(),
itemBuilder: (context, documentSnapshot) => ListTile(
leading: CircleAvatar(child: Icon(Icons.person)),
title: Text(documentSnapshot.data['name']),
subtitle: Text(documentSnapshot.documentID),
),
query: Firestore.instance.collection('users').orderBy('name'),
)`
@lucasbstn Thanks, this worked for me. Btw way I also had figured out a workaround but this seems the right way to solve the problem.
I have used this package for displaying the contents of my firestore collection. But I also have implemented filters such as the
where
clause is changed on the basis of the filter the user has chosen. I tried the store my query in a variable and change it but even after changing the query variable, I am not able to bring the filtered data. Is there any way that I can rebuild the whole PaginatedFirestore widget or any other approach that would help? Thanks.