Add `spy` constructor to ObservableMap (#4)

Sometimes it's useful to observe changes on top of a Map implementation
which has different behavior from one of the built in map types.

- Add a test calling the 'spy' constructor
  Most functionality is already tested. Make sure that calling the 'spy'
  constructor delegates to the underlying map implementation.
2 files changed
tree: 33343d1337628d6ef0e8269f390c9b92ba99314c
  1. lib/
  2. test/
  3. .analysis_options
  4. .gitignore
  5. AUTHORS
  6. CHANGELOG.md
  7. CONTRIBUTING.md
  8. LICENSE
  9. PATENTS
  10. pubspec.yaml
  11. README.md
README.md

Support for detecting and being notified when an object is mutated.

There are two general ways to detect changes:

  • Listen to Observable.changes and be notified when an object changes
  • Use Differ.diff to determine changes between two objects