The goal is to have a ListView that updates when either of these events happens:
Event A: The Firestore collection which provides data to the ListView changes.
Event B: The user selects a button in the app to sort the ListView by some attribute.
I know how to create a StreamBuilder to update the ListView for Event A, but I’m not sure how to update the ListView for Event B.
Is there something I can add inside the builder function of the StreamBuilder to listen for Event B and update the ListView when this happens?