Replies: 1 comment
-
Assuming that the answer here is more than just having an immutable list as the state value, you may want to consider using another provider to track the resetting of the entire list – it could just be a counter whose value is irrelevant, just a detail to trigger additional logic. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a provider that holds a list of items. Several widgets can update the list through the provider and several widgets are listening to the list. Sometimes a widget will completely change the list and when it does the listening widgets need to know that its not just part of the list that changed but the whole list changed. For example one of the listeners is a ListView. If the entire list changes it needs to know to scroll to the top.
What is the appropriate way to do this through the provider?
Beta Was this translation helpful? Give feedback.
All reactions