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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to Equality classes. #265

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

* Require Dart 2.18
* Improve docs for `splitAfter` and `splitBefore`.
* Add `JsonEquality` which is an extra efficient `Equality` on JSON-like
object structures. It's less general than `DeepCollectionEquality`,
but can therefore make assumptions that allows it to be more efficient.
* **BREAKING CHANGE**: `MapEquality` no longer uses `keys`-equality
to decide whether two maps have the same keys.
Instead it assumes that the two maps have compatible key-equalities,
and looks up the keys of one map in the other.
This change is expected to make the equality more useful,
because a `true` result is more likely to mean that one map can be
used as a replacement for the other, rather than the maps just happening to
have the same keys and values, even when they don't use the same key equality.
* **BREAKING CHANGE**: `SetEquality` no longer uses only `keys`-equality
to decide whether two sets have the same elements.
Instead it assumes that the two sets have equalities compatible with the
configured element equality, and uses `Set` operations to match an element
in one set to an element in the other.
This change is expected to make the equality more useful,
because a `true` result is more likely to mean that one mapset can be
used as a replacement for the other, rather than the set just happening to
have the same elements, even when they don't use the same element equality.
* **BREAKING CHANGE**: The `DeepCollectionEquality.unordered` constructor
is now a factory constructor. It creates a subclass which caches equality
and hash computations performed by recursive calls
to avoid performance issues with deep structures
combined with repeated hash/equality checks due to the unordered comparison.

## 1.17.0

Expand Down