There are lots of ways to do this depending on your use case.
You could have them be AnimatedWidget
s that are passed a ValueNotifier
or ChangeNotifier
as the listenable
. You can see this pattern in the Gallery's animation example.
You could use StreamBuilder
to have your widgets rebuild automatically when new events come in on a Stream
. There aren't a lot of examples of this in the main Flutter repo, but it's something that you're likely to need once you start using plugins or doing network I/O.
You could use a GlobalKey
to get currentState
and have one State
call methods on the other. This is how snackbars work (example).
You can also extend InheritedWidget
to provide widgets with information that wasn't passed as a constructor argument, and they'll automatically be marked for rebuild when that information changes. This is how Theme
s work, for example.
If you can provide more details on what your widgets do / what their relationship is, or ideally a code snippet I can help you decide which approach would make the most sense for your situation.