Skip to content
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

Updated counter example to the new @riverpod syntax #2247

Merged
merged 11 commits into from Mar 2, 2023

Conversation

julienlebren
Copy link
Contributor

I replaced StateProvider with a provider created with @riverpod

@codecov
Copy link

codecov bot commented Mar 2, 2023

Codecov Report

Merging #2247 (d6fafb4) into master (8f83cc2) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2247   +/-   ##
=======================================
  Coverage   95.24%   95.24%           
=======================================
  Files          53       53           
  Lines        2250     2250           
=======================================
  Hits         2143     2143           
  Misses        107      107           

@@ -20,7 +23,13 @@ class MyApp extends StatelessWidget {
}

/// Providers are declared globally and specify how to create a state
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments need to be reviewed to match the codegen syntax.

"declared globally" is more about how providers where final global variables. But here it's a class, nothing special.
On the other hand people may want to know what that class means. In particular the build method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it really matter, since the author recently said this 😇
Capture d’écran 2023-03-02 à 15 27 08

More seriously, I have updated the comments in the file.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum not fond of them still. I'll update them to my liking, give me a minute.

examples/counter/lib/main.dart Outdated Show resolved Hide resolved
examples/counter/lib/main.dart Outdated Show resolved Hide resolved
@rrousselGit
Copy link
Owner

Alright~

I'll wait for the CI to pass and merge this. Thanks!

@rrousselGit rrousselGit merged commit 6cf76f3 into rrousselGit:master Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants