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.
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.