rrousselGit / state_notifier

ValueNotifier, but outside Flutter and with some extra perks
MIT License
311 stars 28 forks source link

updateShouldNotify checking behavior fix #58 #59

Closed maxzod closed 2 years ago

maxzod commented 2 years ago

this PR solves #58 thanks to @klondikedragon who made it clear where the bug was i made a small change and added one test to make sure it wont happened again

now updateShouldNotify compares between old and current states

codecov[bot] commented 2 years ago

Codecov Report

Merging #59 (18812e8) into master (05c8ed8) will increase coverage by 0.78%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #59      +/-   ##
==========================================
+ Coverage   93.24%   94.02%   +0.78%     
==========================================
  Files           5        5              
  Lines         503      519      +16     
==========================================
+ Hits          469      488      +19     
+ Misses         34       31       -3     
Impacted Files Coverage Δ
packages/state_notifier/lib/state_notifier.dart 90.00% <100.00%> (+1.88%) :arrow_up:
...kages/state_notifier/test/state_notifier_test.dart 100.00% <100.00%> (ø)
...ter_state_notifier/lib/flutter_state_notifier.dart 100.00% <0.00%> (+2.08%) :arrow_up: