Closed JeromeA closed 8 years ago
Setting length to 0 will notify observers, right? https://github.com/dart-lang/observe/blob/8c6e8f958e6c6931215a541838d79519975d62b9/lib/src/observable_list.dart#L72
Oh, then it means I have a bug in my code :-(. Let me double check tomorrow, but I think you are right.
The problem was in my code, indeed. Sorry for the trouble, and thanks for your help!
When calling clear() on an ObservableList, the ListMixin implementation is called:
This removes all the items, without notifying the observers.
This is breaking the ObservableList contract which states that the observers are notified if any items are added, removed or replaced.