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

Option to supply equality comparer in ObservableList #83

Open
mkatch opened this issue Mar 12, 2019 · 0 comments
Open

Option to supply equality comparer in ObservableList #83

mkatch opened this issue Mar 12, 2019 · 0 comments

Comments

@mkatch
Copy link

mkatch commented Mar 12, 2019

ObservableList normalizes change records before sending the change event
https://github.com/dart-lang/observable/blob/5cb19656f0809b961a328b8f7054a0eb14071978/lib/src/observable_list.dart#L330
The actual work is done by the utility function projectListSplices, which has an optional equality parameter, but this parameter is not used by ObservableList. It would be nice to be able to control the equality comparer used for the sake of determining if the elements are equal. I imagine that an optional equality comparer parameter would be added to some of the constructors of ObservableList.

In my particular use case, I expect reference equality semantics for the purpose of determining whether the list has changed, but the concrete item type has an overridden equality operator to perform deep comparison.

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

1 participant