You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(models): make Drink user-state fields immutable with copyWith (#366)
* fix(models): make Drink user-state fields immutable with copyWith
isFavorite, rating, and isTasted are now final. BeerProvider replaces
list elements via copyWith rather than mutating shared objects, enabling
correct widget diffing and unblocking == / hashCode (see #323).
Fixes#322
* fix(provider): replace by stable id in _replaceDrink; await setRating in test
_replaceDrink now finds drinks by id+festivalId rather than object
identity, preventing missed updates when a caller holds a stale
reference after copyWith.
Also awaits provider.setRating() in drink_detail_screen_test to
eliminate a potential flaky assertion.
Addresses review comments on #366.
0 commit comments