1 Answer. You will need transform your “Container” in a custom statefull widget and then make his state management by your needs. Take a look at BLoC pattern here . With this pattern you will be able to update a specific widget in all widget tree without recreate all widgets.
Read moreDoes setState rebuild all widgets?
In the onPressed event of the “Add Item” button, we add a new item then call setState in order to rebuild WidgetA and all it’s inner widgets , including WidgetB: onPressed: () => setState(() { items.
Read moreHow do you refresh the state in flutter?
Update State In Flutter
Read moreWhy do you need to call setState (() }) in a StatefulWidget when changing some internal data )?
setState is a way to dynamically change the UI . We call it inside the State Object class of the StatefulWidget. Calling setState marks the corresponding Widget dirty .20 Haz 2021
Read moreStatefulwidget nedir?
Eğer, kullanacağımız ekranda widgetlarda değişiklik olacaksa bunu Stateful widget kullanarak oluştururuz. Değişken yapılarla, durumsal bir haldir yani belirli durumlara sahiptir. Örnek olarak, ekranda bir saat göstermek istersek veya sayaçlı bir sistem gibi sürekli değişen değerlerde, stateful widget kullanırız.
Read moreHow do you make a stateful widget in Flutter?
To create a stateful widget in a flutter, use the createState() method . The stateful widget is the widget that describes part of a user interface by building a constellation of other widgets that represent a user interface more concretely. A stateful Widget means a widget that has a mutable state.12 Mar 2022
Read moreDoes setState call build?
A peek behind the curtains. All that setState does is calling the provided callback and then the associated element gets scheduled for a new build .29 Mar 2021
Read more