Listening to specific updates on StateNotifier from other stateNotifiers and/or Providers #1200
-
Hi, I have been struggling with something for a while. In my application I have different providers, simple ones, and also StateNotifier ones.
What I'm trying to accomplish is to update the FirstNotifier whenever To do so what are my options?
The problem is this: how can I listen to specific changes? Inside the listen callback I only have a reference to the new List. Do I have to "compute" manually the changes based on old and new value or there is a way to know that |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Your reasoning is correct. What you're looking for (an event mechanism for every StateNotifier method) does not exist. Placing the logic within the |
Beta Was this translation helpful? Give feedback.
Your reasoning is correct.
What you're looking for (an event mechanism for every StateNotifier method) does not exist. Placing the logic within the
removeElement
method by passing ref like you've mentioned would be the correct solution