'How can I refresh an individual List Tile in a Listview.builder? Flutter
Situation:
- I have an 'Event' item that you can click on --> Event detail screen.
- That has individual subitems (date,participants,description) in the form of a list.
- I load the subitems with a
Future Builderinto aListview.builderwith a List Tile like so:
- I have a button to edit the location, it saves to the database and locally updates the location variable. This calls
SetState(). - The full list is updated, even if some tiles don't have changes.
THE PROBLEM Some tiles, like the participants tile needs to load pictures and some other things that are time intensive. So even if I just change the location and update the list, everything reloads, consuming resources and taking too much time to load a simple string.
WHAT I AM LOOKING FOR
Is it possible to reload only a certain list tile? Would you use another widget instead of ListView.builder? Other logic? Any help is appreciated.
Answer Extension [Update]
The marked answer is correct. I was using future builder and that was forcing me to reload all data always. By using different Streams with Streambuilder I am able to change data on database and it automatically changes on the UI, without updating the state! Magic.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
