Converting extended Riverpod StateNotifier Providers to Code Generation Providers #3638
Unanswered
simon-iversen
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Does anyone have any input on this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think |
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
-
I have a question regarding how to convert some Riverpod StateNotifier Providers to Code Generation Providers. Hopefully it is not too long, but I tried to make it as short as possible without loosing relevant information.
I have this class to store filter options
I then created this
StateNotifier
to manage the state of the filter options.In my app, I have different kinds of test types, like endurance, peakload, live data and so on..
Then I have different providers that uses this same
StateNotifier
to update the state.Here is my issue/question:
I want to convert these providers into riverpod code generation style.
The
StatsFilterOptionsNotifier
could probably be converted like this:I see that the name
StatsFilterOptionsNotifier
should probably be renamed toStatsFilterModifier
or something.However, how to do it like the other providers for the separate tests (endurance, live data and so on) using code generation?
Are there some other ways to structure this?
Beta Was this translation helpful? Give feedback.
All reactions