Changing Firestore Query limit depending on the app / page / widget state

Database & APIs

Hey guys! Say I have 1000000 documents in my Firebase Firestore collection and I want to show them in a ListView, supporting live updates. Of course, quering such a huge number of items may lead to a crash. So I want to show only 100 latest items on page load, and then, if the user sets some filter (for example, date range) - show results with no limit. How can I do that correctly in FF?

What have you tried so far?

I'm thinking of creating 2 ListViews (and 2 queries): one to be shown by default (query with the limit of 100) and one to be shown when the filter is set (with no limit). And I'm afraid that setting visibility of an element to "Not visible" doesn't mean that it's query won't be run. Am I right?

Did you check FlutterFlow's Documentation for this topic?
Yes
2