I'm fighting with Flutter's provider and can't understand all of it's possibilities. The thing is that for example I have such widgets structure:
Widget_A
--Widget_B
----Widget_C
----Widget_D
--Widget_E
--Widget_F
Simple example is TODO list. Imagine you have categories
, add_field
and todos_list
. Each is a separate widget. Than you change categories
so todos_list
should be reloaded to show todos from selected category. Later you add todo using add_field
so todos_list
also need to be updated because of new record. How can I achieve something like this?
PS: I was trying to separate all the stuff to the different Provider classes, but effect is the same: if widget uses Provider.of(context) it will be updated no matter what. And as I should combine data from 2 providers there will be widget that is connected to the both providers so the result will be endless loop. Still.