1

I'm using a Streambuilder to a Firestore instance stream to fetch some "Appointments" which I later modify (delete / add / update). Problem is that each time I modify the date on one, each item reloads (because the StreamBuilder builds a list of the appointments)

I was thinking that something like giving each appointment it's own streambuilder? but that sounds stupid.

What would be a general solid approach to these types of issues , that I can later use in my future apps ?

  • there is nothing wrong in that "each item reloads" - if you are using `ListView.builder` just a few items (those visible ones) reload – pskink Jun 11 '19 at 11:28

1 Answers1

1

You will want to use the ListView.builder() named constructor. It takes a property itemCount: which can be your list such as itemCount: items.length.

This will build the list based on the items currently in your list (firestore in your case).

It will build the list items conditionally as it needs them.

Patrick Kelly
  • 153
  • 1
  • 4