How to prevent child widget redraw when parent widget perform setState()?


I have a ListView inside many stateFull widget of tree, and i cant able to separate from all parent widget.
Listview build from streambuilder(firebase).
From a large hierarchy of stateFull widget, some of them anytime perform setState widget, then child ListView also redraw and once again it will get data from firebase and also its flickering(blinking)

explain below example


There are three parent widget of Listview(), for user friendly app setState called many time in parent widget.

So i want to avoid flickering and redraw of listView(), even if the parent widget redraw(setState())


‘selector’ of Provider is what you find.

But usually optimizing performance is enough for not blinking.
ListView.builder, const Widget, key, etc.,

Answered By – wonpyohong

Answer Checked By – Clifford M. (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *