Replies: 2 comments 4 replies
-
Using state = state.copyWithPrevious(AsyncData(newValue)); |
Beta Was this translation helpful? Give feedback.
3 replies
-
What you're asking is not a thing. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to update the value in an AsyncNotifier's state while keeping the current loading or error state?
If possible, I’d appreciate any specific methods or alternative approaches to achieve the use case described at the end of this post.
Below is an example implementation (replaceValue) that I’d like to achieve:
Similar implementation:
Use case:
The scenario I’m trying to address is as follows:
Code Example
In this case, I need a way to update only the "favorite" status while retaining the loading or error state of the current state.
I would greatly appreciate any advice or ideas on how to handle this.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions