-
Notifications
You must be signed in to change notification settings - Fork 323
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hashCode generator enhancement #4784
Comments
Additional details:
however ... there's now some activity hinting that a method that combines hashes is coming from |
/fyi @scheglov @bwilkerson |
Yes, and when the new static methods in |
@mzdm it is actually acceptable to have two non-equal objects that hash to the same value, although always better if they don't. Closing since the is an issue for the Dart SDK. |
Actually, I believe that the generator is implemented in IntelliJ, though it's probably in the Dart plugin. (On the Mac it's command-M.) It uses a dialog to query which fields to include in the comparisons and that isn't something that server-based tools can do. |
True, items from the |
How do we determine when |
When the built-in generator (ALT + Insert on Windows) is used for example in model classes, we can use it for generating ==, hashCode and toString() methods.
Let's say we have this model class:
Generated hashCode method for this example is:
Instead, I think it would be better if it was generating this
using hashValues
(if it would have more than 1 argument and less than 20)
The text was updated successfully, but these errors were encountered: