Add asyncMapSample transform (dart-lang/stream_transform#79)

Like `asyncMapBuffer` but drops instead of collecting previous events.

- Refactor `_Buffer` class into `Aggregate` which takes a function to
  aggregate values instead of only collecting them to a List. This will
  not be published.
- Add `asyncMapSample` which is effectively an identical implementation
  to `asyncMapBuffer` except it chooses a different aggregation
  function.
7 files changed
tree: f555548655d69a7c84ee5d89262d34746b637248
  1. pkgs/