How to pass dependency to AsyncNotifier? #2493
Unanswered
BadPistol97
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Any update? |
Beta Was this translation helpful? Give feedback.
1 reply
-
You can make the build method required some parameter, or you can use ref.watch(otherProvider) inside build method of AsyncNotifier. |
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 am trying to migrate
StateNotifierProvider
to aAsyncNotifierProvider
.In the
StateNotifier
implementation, I could just define the dependencies in the constructor and provide them in aprovider
declaration.Auto-generated
AsyncNotifierProvider
doesn't recognize my dependencies.Beta Was this translation helpful? Give feedback.
All reactions