When setState() is called on a State, all descendent widgets rebuild . Therefore, localize the setState() call to the part of the subtree whose UI actually needs to change.
Read moreDoes setState rebuild the entire widget tree?
If you call setState() on WidgetB it’ll rebuild itself and it’s descendants, no matter if they are Stateless or Stateful Widgets.
Read moreHow do you refresh widgets?
To refresh a widget, simply press the Refresh Data button, in the upper-right corner of the widget . The widget will then refresh itself with new and up-to-date data.
Read more