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

Added Notifier.stateOrNull #2862

Merged
merged 1 commit into from
Aug 30, 2023
Merged

Added Notifier.stateOrNull #2862

merged 1 commit into from
Aug 30, 2023

Conversation

rrousselGit
Copy link
Owner

This will return null if used when the notifier is uninitialized or in error state.

fixes #2589

This will return null if used when the notifier is uninitialized or in error state.
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #2862 (ffaa92c) into master (6fcd488) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2862   +/-   ##
=======================================
  Coverage   95.24%   95.24%           
=======================================
  Files          53       53           
  Lines        2249     2252    +3     
=======================================
+ Hits         2142     2145    +3     
  Misses        107      107           
Files Changed Coverage Δ
packages/riverpod/lib/src/framework/element.dart 98.23% <100.00%> (ø)
packages/riverpod/lib/src/notifier.dart 100.00% <100.00%> (ø)

@rrousselGit rrousselGit merged commit 6c9b73c into master Aug 30, 2023
42 checks passed
@rrousselGit rrousselGit deleted the stateOrNull branch August 30, 2023 09:00
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.

Offer Notifier.stateOrNull and have Notifier.state throw a custom Exception instead of a StateError
1 participant