I use a cascade of stateful widgets, which are wrapped inside.To prepare WidgetC
, I pass along an Object ParamsBundle
from WidgetA
to WidgetC
.
WidgetA
-> WidgetB
-> WidgetC
Inside if WidgetC I use a GestureDetector
, to track mouse events. By means of developer.log()
I traced, that onPanUpdate
callbacks get called.
Within WidgetC
's state, I call setState()
to change properties of the passed along ParamsBundle
. They do get changed. Nevertheless, the visual representation of the app doesn't change.
If I finally resize the browser's window, the visual get's redrawn.
I wonder, if I have to somehow pass some needs_redraw information up from WidgetC
, to WidgetB
and eventually to WidgetA
.
Do I have to? And how to?
I found the solution using ChangeNotifier
.
But how to use it? But what would WidgetA
do with ChangeNotifier
firing?