changes property

  1. @override
Stream<Change<T>> get changes
override

Provides a stream of change pairs.

Implementation

@override
Stream<Change<T>> get changes {
  T last = value;
  // Want to do this using stream.map so that the `changes` stream has the
  // same broadcastness/syncness as the `stream` stream.
  return stream.map((v) {
    var change = Change<T>(last, v);
    last = v;
    return change;
  });
}