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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken TonalPalette equality operator in dart #56

Closed
KalilDev opened this issue Sep 2, 2022 · 1 comment
Closed

Broken TonalPalette equality operator in dart #56

KalilDev opened this issue Sep 2, 2022 · 1 comment
Assignees

Comments

@KalilDev
Copy link

KalilDev commented Sep 2, 2022

In TonalPalette, when one of the palettes was not generated using the _fromHueAndChroma operator, the following code is called:

return _cache.values.toSet().containsAll(other._cache.values);
. The issue is that when one of the palettes's cache was not filled, the comparision results in a empty set contains an empty set, for example. This results in operator== resulting in true, always, even when the palettes are different. An testcase for this it https://github.com/kalildev/material_color_utilities_issue .

@guidezpl guidezpl self-assigned this Feb 9, 2023
@guidezpl
Copy link
Collaborator

guidezpl commented Feb 9, 2023

Thanks for filing an issue and for the test case, I'll get a fix out shortly.

@guidezpl guidezpl closed this as completed Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants