Closed colin-young closed 1 month ago
This is already in progress: https://github.com/rrousselGit/riverpod/tree/master/packages/riverpod_graph
Excellent!
And my project breaks riverpod_graph with Bad state: No element
. Let me know if you want me to open a new issue and provide details.
It's in progress afterall.
It's in progress afterall.
Yes, although I figure it's always good to have examples of how to break it. Assuming you're not already able to do so :)
I'll probably take a peek at the code and try to debug (for my own education) to see if I can figure anything out. But I can't give any timeline when I might get to that.
For any moderately complex data model, it's very easy to lose track of exactly what providers you have created and how they relate and depend on each other. Being able to automatically generate a class diagram in Mermaid.js from the code would help manage this complexity and produce a useful documentation artifact that would be kept up-to-date automatically.
Some thoughts: using
ref.watch/read/listen
and@riverpod
annotations would probably be the easiest path. It would also have the side-effect of also detecting widgets that depend on each provider. This would help identify duplicate/similar providers and assist in optimizing data access code.