-
-
Notifications
You must be signed in to change notification settings - Fork 956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration page from "old" notifiers to "new" notifiers #2793
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## rework-flow #2793 +/- ##
============================================
Coverage 95.24% 95.24%
============================================
Files 53 53
Lines 2252 2252
============================================
Hits 2145 2145
Misses 107 107 |
Hey @rrousselGit this is a first draft, could you review the flow. If you like it, corrections, etc.? Thanks ❤️ |
@lucavenir It's help if you could fix the CI, such that the deploy preview works :) |
@rrousselGit I didn't realize there was a strict analysis check, even on docs' snippets. It should be OK now |
Ok I am done for this weekend. On a side note, I'd love to have some inputs to the remaining paragraphs. I am unsure I can complete them at 100% by myself without some further reading, or explanation. |
It's the whole point of having them in Dart files :) |
I'll look at it in depth on Monday |
Hey @rrousselGit, how can I access the preview build of this PR, so that I can share it with others? I've had curious people requesting me to read this section on preview 😝 |
This is great! But overall I think this is trying too much to explain the syntax and less-so to explain how to migrate. This feels less like a "How to migrate from StateNotifier to [Async]Notifier" and more like "The differences between StateNotifier and [Async]Notifier". There are a few lines at the very end with steps to migrate, but the ratio between explanation/steps is wrong I think |
Dang, the PR got closed and now I can't commit your suggestions. Did this get closed because it's inherently wrong? |
Oh that's because I merged rework-flow to docs-v2 I think |
Yeah I can't reopen it. Mind maybe a new PR and target the docs-v2 branch? |
Yeah no problem. I'll add your suggestions by hand, and then open a new PR |
On which branch you want me to merge, tho? |
docs-v2 is fine |
Oh god: I tried to merge |
Not sure what those conflicts are? |
There were no conflict between your PR and rework-flow And there were no conflict between rework-flow and docs-v2 either, nor with master |
Uh... besides the sidebar, I've reviewed them by hand one by one now, it should be fine I'm not sure what the best practice is |
For generated files, just run the code-generator again ( For other files, pick whatever you feel is appropriate. I'll see it in the PR anyway |
Okay. Thank you 😄 |
Aims to fix #2630.
About "from
ChangeNotifier
/StateNotifier
toNotifier
/AsyncNotifier
":[ ] Showcase a simpleChangeNotifier
toNotifier
migrationChangeNotifier
toAsyncNotifier
migrationAboutAsyncValue.when
:Document that e.g. you can obtain even three different values from a single AsyncValueDocument how to correctly usevalueOrNull
,hasError
,hasData
,asError
,isLoading
to intercept various statesAboutProviderObserver
:ProviderListener
is not a thing anymore: useProviderObserver
instead