How to use Riverpod in a pure Dart project? #3694
-
I have a pure Dart project where I'd like to use riverpod for dependency injection etc but I can't find any docs or examples for doing that. What would be the best approach? Using |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
I would recommend using
Yes, you need some container to access your providers. |
Beta Was this translation helpful? Give feedback.
-
Generally you'll want to create only one ProviderContainer, inside the |
Beta Was this translation helpful? Give feedback.
Generally you'll want to create only one ProviderContainer, inside the
main
(not as a global!).Then have the main
container.listen
some providers.