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

Last changes with hash function is not good at all #43

Closed
machinescream opened this issue Nov 24, 2019 · 3 comments
Closed

Last changes with hash function is not good at all #43

machinescream opened this issue Nov 24, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@machinescream
Copy link
Contributor

machinescream commented Nov 24, 2019

code:

class ComparableWrapper extends Equatable {
  final Object property;
  ComparableWrapper(this.property);

  @override
  List<Object> get props => [property];
}

v1.0.0:
code:

    final map = {1: '1', 2: '2'};
    print(ComparableWrapper(map).hashCode);
    map.remove(1);
    print(ComparableWrapper(map).hashCode);

console:
1061099485
1061099485

v0.6.1:
code:

    final map = {1: '1', 2: '2'};
    print(ComparableWrapper(map).hashCode);
    map.remove(1);
    print(ComparableWrapper(map).hashCode);

console:
343974154
350953922

Well, I am understand you want to find a good hash function, but I think last one was better =) Thx

@felangel
Copy link
Owner

Hi @Renesanse 👋
Thanks for opening an issue and for catching this case! I'll have a fix asap 👍

@felangel felangel self-assigned this Nov 24, 2019
@felangel felangel added the bug Something isn't working label Nov 24, 2019
@felangel felangel mentioned this issue Nov 24, 2019
3 tasks
@felangel
Copy link
Owner

Fixed in #44 and published in v1.0.1

@machinescream
Copy link
Contributor Author

Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants