in flutter i have a listView that gets it’s item from a list and the list is downloded from the internet, whenever a new item added to the list i have an event that tells the app a new item added, and for that i use notifyListners() to refresh the list view to display the new item,
my problem with this method is that sometimes there are big sized items in the list and refreshing all of them the moment a new item comes it really slows down the app and it’s such a bad user experience, what i want to do is get the list one time and only notify the app about the new item
2
Answers
Instead of list view you can use ListView.builder.
ListView.builder is a convenient widget for efficiently creating a scrollable list of widgets. It only creates widgets for the items that are currently in view, which makes it efficient for large lists.
You can only update a newly added item
In list view only itemwidget will get rebuild instead of all the list