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
Dart 2.14 adds new hashing methods like Object.hash (uses optional arguments for up to 20 objects) and Object.hashAll (uses a list for a large or variable number of objects).
Using the built-in hashing functions would allow this package to have a smaller footprint and fit in with everything else if the Dart maintainers ever decide to change or optimise the hashing algorithm.
The text was updated successfully, but these errors were encountered:
I’m aware of Object.hash and Object.hashAll however last time I checked replacing the current implementation with Object.hashAll breaks the existing unit test suite.
I’ll take another look in the next week but if you’d like feel free to open a pull request. Thanks!
I've just had a go at implementing this, but it's more complicated than I initially expected due to the recursive collection hashing functionality.
I have a question: Why not use _equality's hash method in mapPropsToHashCode? It seems to do the same thing as the existing implementation, although I'm not sure if it uses the same algorithm.
Dart 2.14 adds new hashing methods like
Object.hash
(uses optional arguments for up to 20 objects) andObject.hashAll
(uses a list for a large or variable number of objects).The reasoning behind this addition to the language can be found at dart-lang/sdk#11617.
Also see https://dart-review.googlesource.com/c/sdk/+/73360.
Using the built-in hashing functions would allow this package to have a smaller footprint and fit in with everything else if the Dart maintainers ever decide to change or optimise the hashing algorithm.
The text was updated successfully, but these errors were encountered: