Fix EqualUnmodifiableListView equality to use content-based comparison#1311
Fix EqualUnmodifiableListView equality to use content-based comparison#1311devalgupta404 wants to merge 1 commit into
Conversation
WalkthroughThe changes update equality and hash code implementations for Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes The changes follow a consistent pattern across three related classes with straightforward logic updates. Each modification replaces reference-based equality with deep content-based equality, making the intent clear and review effort minimal. Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This PR fixes the equality comparison for
EqualUnmodifiableListView,EqualUnmodifiableSetView, andEqualUnmodifiableMapViewto use content-based comparison instead of object reference comparison.Changes
==operator to useDeepCollectionEquality().equals()for content comparisonhashCodeto useDeepCollectionEquality().hash()for consistent hashingFixes
Resolves #1308
Impact
This fix ensures consistency between freezed
Listequality and freezed objects containing lists, which resolves the Riverpodref.watch(Provider).select()issue mentioned in the GitHub issue.Summary by CodeRabbit