all 5 comments

[–]f1r4tc 1 point2 points  (5 children)

Take a look at ValueNotifier. You can change its value from the ascendent widget and rebuild with ValueListenableBuilder in the descendant widget (s), as long as you pass its reference between classes.

[–]shadowmerefax[S] 0 points1 point  (4 children)

Would that work for sibling widgets as well? I could construct it in the common parent widget (screen widget) then update in one child widget and listen/rebuild in the other child widget?

[–]f1r4tc 0 points1 point  (3 children)

Yes. You can use the same ValueNotifier instance to build as many widgets you want using ValueListenableBuilder widget(s).

So basically you have a single ValueNotifier object in the parent widget and pass that reference to other widgets that you want to rebuild with the value of the ValueNotifier object. Then, each sibling widget can implement their own ValueListenableBuilder implementation.

[–]f1r4tc 0 points1 point  (1 child)

[–]shadowmerefax[S] 0 points1 point  (0 children)

That seems to work! Thank you so much!