DelegatingStreamSink.typed() static methods. These wrap untyped instances of these classes with the correct type parameter, and assert the types of values as they're accessed.
DelegatingStream class. This is behaviorally identical to
dart:async, but it follows this package's naming conventions and provides a
DelegatingStream.typed() static method.
Fix all strong mode warnings and add generic method annotations.
new DelegatingEventSink(), and
new DelegatingStreamSink() now take arguments with generic type arguments (for example
Stream<T>) rather than without (for example
Stream<dynamic>). Passing a type that wasn't
is-compatible with the fully-specified generic would already throw an error under some circumstances, so this is not considered a breaking change.
ErrorResult now takes a type parameter.
Result.asError now returns a
Deprecate top-level libraries other than
package:async/async.dart, which exports these libraries' interfaces.
Result.releaseSinkTransformer should be used instead.
StreamSinkCompleter, for creating a
StreamSink now and providing its destination later as another sink.
StreamCompleter.setError, a shortcut for emitting a single error event on the resulting stream.
NullStreamSink, an implementation of
StreamSink that discards all events.
StreamTransformerthat converts a broadcast stream into a single-subscription stream.
CancelableOperation.valueOrCancellation(), which allows users to be notified when an operation is canceled elsewhere.
StreamSinkTransformer which transforms events before they‘re passed to a
StreamSink, similarly to how
StreamTransformer transforms events after they’re emitted by a stream.
LazyStream, which forwards to the return value of a callback that's only called when the stream is listened to.
AsyncMemoizer.future, which allows the result to be accessed before
runOnce() is called.
CancelableOperation, an asynchronous operation that can be canceled. It can be created using a
RestartableTimer, a non-periodic timer that can be reset over and over.
StreamCompleter class for creating a stream now and providing its events later as another stream.
StreamQueue class which allows requesting events from a stream before they are avilable. It is like a
StreamIterator that can queue requests.
SubscriptionStream which creates a single-subscription stream from an existing stream subscription.
ResultFuture class for synchronously accessing the result of a wrapped future.
FutureGroup.isIdle, which provide visibility into whether a group is actively waiting on any futures.
AsyncMemoizer class for running an asynchronous block of code exactly once.
Added delegating wrapper classes for a number of core async types:
DelegatingStreamSubscription. These are all simple wrappers that forward all calls to the wrapped objects. They can be used to expose only the desired interface for subclasses, or extended to add extra functionality.
FutureGroup class for waiting for a group of futures, potentially of unknown size, to complete.
StreamGroup class for merging the events of a group of streams, potentially of unknown size.
StreamSplitter class for splitting a stream into multiple new streams.