devtools
devtools copied to clipboard
Add riverpod tool
This PR adds support to Riverpod
, the code is heavily based on the current Provider
implementation. It uses provider's InstanceViewer
widget to show the state values.
https://user-images.githubusercontent.com/11666470/175167035-4027eb48-7f7b-44e6-bb83-af7e8d8feaaf.mp4
The discussion about this solution can be found at riverpod's repo.
TODO: this PR is still a Draft, the tests will be added before opening it for real.
Pre-launch Checklist
- [X] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [X] I read the Tree Hygiene wiki page, which explains my responsibilities.
- [X] I read the Flutter Style Guide recently, and have followed its advice.
- [X] I signed the CLA.
- [ ] I listed at least one issue that this PR fixes in the description above.
- [X] I updated/added relevant documentation (doc comments with
///
). - [ ] I added new tests to check the change I am making, or this PR is test-exempt.
- [ ] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel on Discord.
Fyi @rrousselGit.
@rrousselGit Just added tests, this PR is ready to be reviewed, but as we need the riverpod one to be merged first I'll leave this one as draft
for now.
That's great, thanks for your work!
I'll try playing around with it this w-e to see.
This is looking great to me.
Any thoughts @jacob314?
If that's good for you, I can merge the associated PR adding dart:developer events to Riverpod, then we can remove the git dependency.
While we're waiting for a review, it'd be great to add support for the upcoming code-generator
Fancy supporting it?
You mean Riverpod 2.0
?
I mean the "Riverpod_generator" project in the master branch of Riverpod
I'll take a look, if I have questions I'll talk to you.
I'm confused why this PR is made on the devtool repository itself as riverpod has nothing to do with the dev tools.
I'd have assumed a riverpod_devtools
or some extension package. Same if I want to create my own dev tool extension.
Edit: oh right, it does not support extensions yet. In any case I don't think public libraries should be accepted here, even widely used ones.
Since DevTools does not yet support plugins or extensions, we're going to close this for now. DevTools plugin support is something we are hoping to work on later this year (here is an existing design proposal for this). Converting the existing package:provider screen as well as this riverpod screen to a plugin would be great first use cases to work on when plugin support is added. We will definitely reach out when this support is available. Thank you for the contribution!
Hello @adsonpleal and @rrousselGit - now that support for DevTools extensions has officially landed, do you have interest in re-landing this PR on the riverpod repo directly as a DevTools extension? As an example, the Provider related code from DevTools was migrated to a DevTools extension in package:provider
here, and published as part of 6.1.0-dev.1
@rrousselGit can you provide some guidance on which riverpod package the extension should live in (I would guess riverpod
?)
I'm already working on it :)