You just need to add a field to child widget then in parent widget change value of that field and call setState() .
Read moreDoes setState rebuild?
setState() It is used to notify the framework that “data has changed”, and the widget at this build context should be rebuilt .
Read moreWhat is the difference between a stateless widget and a stateful widget in flutter?
A widget is either stateful or stateless. If a widget can change—when a user interacts with it, for example—it’s stateful. A stateless widget never changes . Icon , IconButton , and Text are examples of stateless widgets.
Read moreWhy do we need stateless widget?
Stateless widget are useful when the part of the user interface you are describing does not depend on anything other than the configuration information in the object itself and the BuildContext in which the widget is inflated .
Read moreHow do you change the state on flutter?
setState method Null safety Notify the framework that the internal state of this object has changed. Whenever you change the internal state of a State object, make the change in a function that you pass to setState: setState(() { _myState = newValue; }); The provided callback is immediately called synchronously.
Read moreHow do you rebuild a stateful widget flutter?
The solution is to pass a new Key to WidgetB every time we need it to be rebuilt : WidgetA will see that WidgetB has changed and will rebuild it when setState is called. In other words, whenever a stateful widget’s Key property changes, calling setState on its parent will force a rebuild of the stateful widget.
Read moreHow do you refresh current state in flutter?
Force Flutter navigator to reload state when popping
Read more