Breaking Changes

Version 0.21.0 reverts to version 0.17.0+1 with fixes to support Dart 2. Versions 0.18, 0.19, and 0.20 were effectively unsupported. This resolves the fork that happened at version 0.18 and development can now be supported by the authors.


  • Support the latest release of pkg/quiver (0.27).


  • Support the latest release of pkg/quiver (0.26).
  • Bug fix: Some minor type fixes for strict runtimes (and Dart 2.0), namely:
    • PropertyChangeNotifier merely extends ChangeNotifier rather than extends ChangeNotifier<PropertyChangeRecord>.
    • Introduce new ListChangeRecord.NONE and MapChangeRecord.NONE.


  • Support the latest release of pkg/quiver (0.25).


  • Bug fix: Additional fix around ObservableList.listChanges


  • Bug fix: Avoid emitting an empty list via ObservableList.listChanges


  • Bug fix: Avoid emitting a no-op MapChangeRecord
  • Bug fix: Restore ObservableList.discardListChanges functionality


  • Add Observable<List|Set|Map>.unmodifiable for immutable collections
  • Add Observable<List|Set|Map>.EMPTY for empty immutable collections
    • This can be used as an optimization for libraries that always need to return an observable collection, but don't want to allocate a new instance to represent an empty immutable.


  • Add ObservableSet, SetChangeRecord, and SetDiffer


  • Refactor and deprecate ObservableMap-specific API
    • ObservableMap no longer emits #keys and #values change records
    • ObservableMap.spy is deprecated, becomes .delegate instead
  • Potentially breaking: ObservableMap may no longer be extended

It is also considered deprecated to be notified of length changes.


  • Bug fix: Do not throw when Observable<T>.notifyChange is used


  • Refactor and deprecate ObservableList-specific API
    • ObservableList.applyChangeRecords
    • ObservableList.calculateChangeRecords
    • ObservableList.withLength
    • ObservableList.deliverListChanges
    • ObservableList.discardListChanges
    • ObservableList.hasListChanges
    • ObservableList.listChanges
    • ObservableList.notifyListChange
  • Potentially breaking: ObservableList may no longer be extended

It is also considered deprecated to be notified of length, isEmpty and isNotEmpty PropertyChangeRecords on ObservableList - in a future release ObservableList.changes will be Stream<List<ListChangeRecord>>.


  • Revert PropertyChangeMixin, which does not work in dart2js


This is a larger change with a goal of no runtime changes for current customers, but in the future Observable will become a very lightweight interface, i.e.:

abstract class Observable<C extends ChangeRecord> {
  Stream<List<C>> get changes;
  • Started deprecating the wide Observable interface
    • ChangeNotifier should be used as a base class for these methods:
      • Observable.observed
      • Observable.unobserved
      • Observable.hasObservers
      • Observable.deliverChanges
      • Observable.notifyChange
    • PropertyChangeNotifier should be used for these methods:
      • Observable.notifyPropertyChange
    • Temporarily, Observable uses ChangeNotifier
      • Existing users of anything but implements Observable should move to implementing or extending ChangeNotifier. In a future release Observable will reduce API surface down to an abstract Stream<List<C>> get changes.
  • Added the ChangeNotifier and PropertyChangeNotifier classes
    • Can be used to implement Observable in a generic manner
  • Observable is now Observable<C extends ChangeRecord>
    • When passing a generic type C, notifyPropertyChange is illegal


  • Refactored MapChangeRecord
    • Added equality and hashCode checks
    • Added MapChangeRecord.apply to apply a change record
  • Added MapDiffer, which implements Differ for a Map


  • Fix a bug in ListDiffer that caused a RangeError


  • Fix analysis errors caused via missing /*<E>*/ syntax in 0.15.0


  • Added the Differ interface, as well as EqualityDiffer
  • Refactored list diffing into a ListDiffer
  • Added concept of ChangeRecord.ANY and ChangeRecord.NONE
    • Low-GC ways to expression “something/nothing” changed
  • Refactored ListChangeRecord
    • Added named constructors for common use cases
    • Added equality and hashCode checks
    • Added ListChangeRecord.apply to apply a change record
  • Added missing @override annotations to satisfy annotate_overrides


  • Add a missing dependency on pkg/meta.