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 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 moreWhat is a value Notifier?
In Dart, a ValueNotifier is a special type of class that extends a ChangeNotifer . A ValueNotifier can hold a single value. The value itself can be of any type. It can be an int , a String , a bool or your own data type.19 Şub 2020
Read moreHow do I force a widget to rebuild in 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 more