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

Implementation of cast methods allows mutation without notifications. #92

Open
markegli opened this issue Jan 31, 2020 · 0 comments
Open

Comments

@markegli
Copy link
Collaborator

markegli commented Jan 31, 2020

Changes on ObservableMap and ObservableList objects created via cast or castFrom mutate the original collections but do not trigger notifications on the original collections.

final original = ObservableList<int>.from([1, 2, 3]);
original.changes.listen(print); // Listener never triggered.
final cast = original.cast<num>();
cast.add(4);
print(original); // Prints [1, 2, 3, 4].
await Future(() {}); // Flush any microtasks.
@markegli markegli mentioned this issue Nov 11, 2021
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