trigger future through to the result stream in takeUntil. Previously an error would have not closed the stream, and instead raised as an unhandled async error.whereNotNull.StreamSubscription.cancel() before listening to the subsequent stream in switchLatest and switchMap.switchMap and improve documentation with links and clarification.trailing argument to throttle.debounce.asyncMapSample, buffer, combineLatest, combineLatestAll, merge, and mergeAll which would cause an exception when cancelling a subscription after using the transformer if the original stream(s) returned null from cancelling their subscriptions.concurrentAsyncExpand to interleave events emitted by multiple sub streams created by a callback.Add extension methods for most transformers. These should be used in place of the current methods. All current implementations are deprecated and will be removed in the next major version bump.
stream.transform(debounce(Duration(seconds: 1))) use stream.debounce(Duration(seconds: 1)).StreamTransformer instance is stored or passed see “Getting a StreamTransformer instance” on the README.The map and chainTransformers utilities are no longer useful with the new patterns so they are deprecated without a replacement. If you still have a need for them they can be replicated with StreamTransformer.fromBind:
// Replace `map(convert)` StreamTransformer.fromBind((s) => s.map(convert)); // Replace `chainTransformers(first, second)` StreamTransformer.fromBind((s) => s.transform(first).transform(second));
asyncMapSample transform.<void> generic type rather than an implicit dynamic>onError callback in tap.combine callback to return a FutureOr<T> in scan. There are no behavior changes for synchronous callbacks. Potential breaking change In the unlikely situation where scan was used to produce a Stream<Future> inference may now fail and require explicit generic type arguments.combineLatest.combineLatestAll.whereType.asyncWhere will now forward exceptions thrown by the callback through the result Stream.concurrentAsyncMap.mergeAll now accepts an Iterable<Stream> instead of only List<Stream>.chainTransformers and map for use cases where StreamTransformer instances are stored as variables or passed to methods other than transform.concat as followedBy to match the naming of Iterable.followedBy. concat is now deprecated.Updates to support Dart 2.0 core library changes (wave 2.2). See issue 31847 for details.
asyncMapBuffer.takeUntil.scan and switchMap now correctly report isBroadcast.startWith, startWithMany, and startWithStream.throttle, debounce, asyncWhere and audit.tap data callback once per event rather than once per listener.merge transform.StreamControllers for forwarding where possible.asyncWhere: Like where but allows an asynchronous predicate.scan: fold which returns intermediate valuesthrottle: block events for a duration after emitting a valueaudit: emits the last event received after a durationtap: React to values as they pass without being a subscriber on a streamswitchMap and switchLatest: Flatten a Stream of Streams into a Stream which forwards values from the most recent Streamconcat: Appends streams in seriesmerge and mergeAll: Interleaves streamsbuffer: Collects events in a List until a trigger stream fires.debounce, debounceBuffer: Collect or drop events which occur closer in time than a given duration.