Hello I have a StreamBuilder which takes stream value from variable:
var streamByCreation = FirebaseFirestore.instance
.collection('Consultant')
.where('onHold', isEqualTo: true)
.orderBy('createdAt', descending: true)
.snapshots();
var streamByOnline = FirebaseFirestore.instance
.collection('Consultant')
.where('onHold', isEqualTo: true)
.where('isOnline', isEqualTo: true)
.orderBy('createdAt', descending: true)
.snapshots();
var streamByVote = FirebaseFirestore.instance
.collection('Consultant')
.where('onHold', isEqualTo: true)
.orderBy('likes', descending: true)
.snapshots();
I want to call each variable into a setState to init StreamBuilder with different Stream as per User request, using this function as fillter.
How to do that