async
Utility functions and classes related to the 'dart:async' library.
2.13.1
12M downloads/mo
#9 most downloaded on pub.dev
dart-lang/core
What this package is like to depend on
Last release 5 months ago
26 Mar 2026
Release timing varies
gaps range from 3 weeks to 1.6 years
Most releases are documented
notes for 46 of 62 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
66 releases · first in 2013
1 release in the last 12 months
see the full history below
Release timeline
66 releases · May 2013 to Mar 2026Releases
latest 60 of 66-
2.13.126 Mar 2026Release notes
Open source →- Fix
StreamGroup.broadcast().close()to properly complete when all streams in the group close without being explicitly removed. - Run
dart formatwith the new style.
Release notes
Open source →- Fix
StreamGroup.broadcast().close()to properly complete when all streams in the group close without being explicitly removed. - Run
dart formatwith the new style. - Can decide
fetchmethod ofAsyncCachewill store exception or not by usingcacheErrorsproperty.
- Fix
-
2.13.006 Feb 2025 -
2.12.016 Oct 2024 -
2.11.010 Mar 2023Release notes
Open source →- Add
CancelableOperation.fromValue. - Add
StreamExtensions.listenAndBuffer, which buffers events from a stream before it has a listener.
- Add
-
2.10.024 Oct 2022Release notes
Open source →- Add
CancelableOperation.thenOperationwhich gives more flexibility to complete the resulting operation. - Add
CancelableCompleter.completeOperation. - Require Dart 2.18.
- Add
-
2.9.001 Apr 2022Release notes
Open source →- Potentially Breaking The default
propagateCancelargument toCancelableOperation.thenchanged fromfalsetotrue. In most usages this won't have a meaningful difference in behavior, but in usages where the behavior is important propagation is the more common need. If there are anyCancelableOperationwith multiple listeners where canceling subsequent computation using.thenshouldn't also cancel the original operation, passpropagateCancel: false. - Add
StreamExtensions.firstOrNull. - Add a
CancelableOperation.fromSubscription()static factory. - Add a
CancelableOperation.race()static method. - Update
StreamGroupmethods that return aFuture<dynamic>today to return aFuture<void>instead. - Deprecated
AsyncCache.fetchStream. - Make
AsyncCache.ephemeralinvalidate itself immediately when the returned future completes, rather than wait for a later timer event.
- Potentially Breaking The default
-
2.8.210 Aug 2021 -
2.8.122 Jul 2021Release notes
Open source →- Don't ignore broadcast streams added to a
StreamGroupthat doesn't have an active listener but previously had listeners and contains a single subscription inner stream.
- Don't ignore broadcast streams added to a
-
2.8.022 Jul 2021Release notes
Open source →- Add
EventSinkBase,StreamSinkBase, andIOSinkBaseclasses to make it easier to implement custom sinks. - Improve performance for
ChunkedStreamReaderby creating fewer internal sublists and specializing to create views forUint8Listchunks.
- Add
-
2.7.020 May 2021Release notes
Open source →- Remove sorting of the
allowedHelpargument in usage output. Ordering will
depend on key order for the passedMap. - Fix the repository URL in
pubspec.yaml. - Added option
hideNegatedUsagetoArgParser.flag()allowing a flag to be
negatablewithout showing it in the usage text. - Fixed #101, adding check for mandatory when using
.option().
Release notes
Open source →- Add a
Stream.slices()extension method. - Fix a bug where
CancelableOperation.thenmay invoke theonValuecallback, even if it had been canceled beforeCancelableOperation.valuecompletes. - Fix a bug in
CancelableOperation.isCompletewhere it may appear to be complete and no longer be cancelable when it in fact could still be canceled.
- Remove sorting of the
-
2.6.103 May 2021Release notes
Open source →- When
StreamGroup.stream.listen()is called, gracefully handle component streams throwing errors when theirStream.listen()methods are called.
- When
-
2.6.028 Apr 2021Release notes
Open source →- Add a
StreamCloserclass, which is aStreamTransformerthat allows the caller to force the stream to emit a done event. - Added
ChunkedStreamReaderfor reading chunked streams without managing buffers. - Add extensions on
StreamSink, includingStreamSink.transform()for applyingStreamSinkTransformers andStreamSink.rejectErrors(). - Add
StreamGroup.isIdleandStreamGroup.onIdle. - Add
StreamGroup.isClosedandFutureGroup.isClosedgetters.
- Add a
-
2.5.002 Feb 2021 -
2.5.0-nullsafety.303 Nov 2020 pre-releaseRelease notes
Open source →- Update SDK constraints to
>=2.12.0-0 <3.0.0based on beta release guidelines.
- Update SDK constraints to
-
2.5.0-nullsafety.223 Oct 2020 pre-releaseRelease notes
Open source →- Remove the unusable setter
CancelableOperation.operation=. This was mistakenly added to the public API but could never be called. - Allow 2.12.0 dev SDK versions.
- Remove the unusable setter
-
2.5.0-nullsafety.122 Sep 2020 pre-release -
2.5.0-nullsafety29 Jul 2020 pre-release -
2.4.206 Jul 2020 -
2.4.116 Mar 2020Release notes
Open source →- Deprecate
DelegatingStream.typed. UseStream.castinstead. - Deprecate
DelegatingStreamSubcription.typedandDelegatingStreamConsumer.typed. For each of these theStreamshould be cast to the correct type before being used. - Deprecate
DelegatingStreamSink.typed.DelegatingSink.typed,DelegatingEventSink.typed,DelegatingStreamConsumer.typed. For each of these a newStreamControllercan be constructed to forward to the sink.StreamController<T>()..stream.cast<S>().pipe(sink) - Deprecate
typedStreamTransformer. Cast after transforming instead. - Deprecate
StreamSinkTransformer.typedsince there was no usage. - Improve docs for
CancelablOperation.fromFuture, indicate thatisCompletedstartstrue.
- Deprecate
-
2.4.003 Oct 2019 -
2.3.017 Jul 2019 -
2.2.005 Apr 2019 -
2.1.022 Mar 2019Release notes
Open source →- Fix
CancelableOperation.valueOrCancellation's type signature - Add
isCanceledandisCompletedtoCancelableOperation.
- Fix
-
2.0.819 Jul 2018Release notes
Open source →- Set max SDK version to
<3.0.0. - Deprecate
DelegatingFuture.typed, it is not necessary in Dart 2.
- Set max SDK version to
-
2.0.703 May 2018Release notes
Open source →- Fix Dart 2 runtime errors.
- Stop using deprecated constants from the SDK.
-
2.0.603 Mar 2018 -
2.0.527 Feb 2018 -
2.0.410 Feb 2018Release notes
Open source →-
Add support for Dart 2.0 library changes to
StreamandStreamTransformer. Changed classes that implementStreamTransformerto extendStreamTransformerBase, and changed signatures offirstWhere,lastWhere, andsingleWhereon classes extendingStream. See also issue 31847.
-
-
2.0.305 Jan 2018Release notes
Open source →- Fix a bug in
StreamQueue.startTransaction()and related methods when rejecting a transaction that isn't the oldest request in the queue.
- Fix a bug in
-
2.0.203 Jan 2018 -
2.0.103 Oct 2017 -
2.0.029 Aug 2017Release notes
Open source →-
Remove deprecated public
result.dartandstream_zip.dartlibraries and deprecated classesReleaseStreamTransformerandCaptureStreamTransformer. -
Add
captureAllandflattenListstatic methods toResult. -
Change
ErrorResultto not be generic and always be aResult<Null>. That makes an error independent of the type of result it occurs instead of.
-
-
1.13.317 May 2017Release notes
Open source →- Make
TypeSafeStreamextendStreaminstead of implementing it. This ensures that new methods onStreamare automatically picked up, they will go through thelistenmethod which type-checks every event.
- Make
-
1.13.220 Feb 2017 -
1.13.115 Feb 2017 -
1.13.006 Feb 2017Release notes
Open source →-
Add
collectBytesandcollectBytesCancelablefunctions which collects list-of-byte events into a single byte list. -
Fix a bug where rejecting a
StreamQueueTransactionwould throw aStateErrorifStreamQueue.resthad been called on one of its child queues. -
StreamQueue.withTransaction()now properly returns whether or not the transaction was committed.
-
-
1.12.024 Jan 2017Release notes
Open source →-
Add an
AsyncCacheclass that caches asynchronous operations for a period of time. -
Add
StreamQueue.peekandStreamQueue.lookAheead. These allow users to look at events without consuming them. -
Add
StreamQueue.startTransaction()andStreamQueue.withTransaction(). These allow users to conditionally consume events based on their values. -
Add
StreamQueue.cancelable(), which allows users to easily make aCancelableOperationthat can be canceled without affecting the queue. -
Add
StreamQueue.eventsDispatchedwhich counts the number of events that have been dispatched by a given queue. -
Add a
subscriptionTransformer()function to createStreamTransformers that modify the behavior of subscriptions to a stream.
-
-
1.11.324 Oct 2016 -
1.11.227 Sep 2016Nothing published for this version
-
1.11.119 Jul 2016 -
1.11.009 May 2016Release notes
Open source →-
Add a
typedStreamTransformer()function. This wraps an untypedStreamTransformerwith the correct type parameters, and asserts the types of events as they're emitted from the transformed stream. -
Add a
StreamSinkTransformer.typed()static method. This wraps an untypedStreamSinkTransformerwith the correct type parameters, and asserts the types of arguments passed in to the resulting sink.
-
-
1.10.012 Apr 2016Release notes
Open source →-
Add
DelegatingFuture.typed(),DelegatingStreamSubscription.typed(),DelegatingStreamConsumer.typed(),DelegatingSink.typed(),DelegatingEventSink.typed(), andDelegatingStreamSink.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. -
Add a
DelegatingStreamclass. This is behaviorally identical toStreamViewfromdart:async, but it follows this package's naming conventions and provides aDelegatingStream.typed()static method. -
Fix all strong mode warnings and add generic method annotations.
-
new StreamQueue(),new SubscriptionStream(),new DelegatingStreamSubscription(),new DelegatingStreamConsumer(),new DelegatingSink(),new DelegatingEventSink(), andnew DelegatingStreamSink()now take arguments with generic type arguments (for exampleStream<T>) rather than without (for exampleStream<dynamic>). Passing a type that wasn'tis-compatible with the fully-specified generic would already throw an error under some circumstances, so this is not considered a breaking change. -
ErrorResultnow takes a type parameter. -
Result.asErrornow returns aResult<T>.
-
-
1.9.008 Mar 2016Release notes
Open source →-
Deprecate top-level libraries other than
package:async/async.dart, which exports these libraries' interfaces. -
Add
Result.captureStreamTransformer,Result.releaseStreamTransformer,Result.captureSinkTransformer, andResult.releaseSinkTransformer. -
Deprecate
CaptureStreamTransformer,ReleaseStreamTransformer,CaptureSink, andReleaseSink.Result.captureStreamTransformer,Result.releaseStreamTransformer,Result.captureSinkTransformer, andResult.releaseSinkTransformershould be used instead.
-
-
1.8.025 Jan 2016Release notes
Open source →-
Added
StreamSinkCompleter, for creating aStreamSinknow and providing its destination later as another sink. -
Added
StreamCompleter.setError, a shortcut for emitting a single error event on the resulting stream. -
Added
NullStreamSink, an implementation ofStreamSinkthat discards all events.
-
-
1.7.019 Jan 2016Release notes
Open source →- Added
SingleSubscriptionTransformer, aStreamTransformerthat converts a broadcast stream into a single-subscription stream.
- Added
-
1.6.011 Jan 2016Release notes
Open source →-
Added
CancelableOperation.valueOrCancellation(), which allows users to be notified when an operation is canceled elsewhere. -
Added
StreamSinkTransformerwhich transforms events before they're passed to aStreamSink, similarly to howStreamTransformertransforms events after they're emitted by a stream.
-
-
1.5.014 Dec 2015Release notes
Open source →- Added
LazyStream, which forwards to the return value of a callback that's only called when the stream is listened to.
- Added
-
1.4.028 Oct 2015Release notes
Open source →-
Added
AsyncMemoizer.future, which allows the result to be accessed beforerunOnce()is called. -
Added
CancelableOperation, an asynchronous operation that can be canceled. It can be created using aCancelableCompleter. -
Added
RestartableTimer, a non-periodic timer that can be reset over and over.
-
-
1.3.010 Aug 2015Release notes
Open source →-
Added
StreamCompleterclass for creating a stream now and providing its events later as another stream. -
Added
StreamQueueclass which allows requesting events from a stream before they are avilable. It is like aStreamIteratorthat can queue requests. -
Added
SubscriptionStreamwhich creates a single-subscription stream from an existing stream subscription. -
Added a
ResultFutureclass for synchronously accessing the result of a wrapped future. -
Added
FutureGroup.onIdleandFutureGroup.isIdle, which provide visibility into whether a group is actively waiting on any futures. -
Add an
AsyncMemoizerclass for running an asynchronous block of code exactly once. -
Added delegating wrapper classes for a number of core async types:
DelegatingFuture,DelegatingStreamConsumer,DelegatingStreamController,DelegatingSink,DelegatingEventSink,DelegatingStreamSink, andDelegatingStreamSubscription. 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.
-
-
1.2.026 Jun 2015Release notes
Open source →-
Added a
FutureGroupclass for waiting for a group of futures, potentially of unknown size, to complete. -
Added a
StreamGroupclass for merging the events of a group of streams, potentially of unknown size. -
Added a
StreamSplitterclass for splitting a stream into multiple new streams.
-
-
1.1.023 Feb 2015 -
1.0.023 May 2014Nothing published for this version
-
1.0.0+123 Sep 2014Nothing published for this version
-
0.9.120 Dec 2013Nothing published for this version
-
0.9.020 Dec 2013Nothing published for this version
-
0.1.719 May 2013Nothing published for this version
-
0.1.7+20130522220722 May 2013Nothing published for this version
-
0.1.7+20130607234607 Jun 2013Nothing published for this version
-
0.1.7+20130703174103 Jul 2013Nothing published for this version
-
0.1.7+20130703174203 Jul 2013Nothing published for this version