Contains utility classes in the style ofdart:async to work with asynchronouscomputations.
Package API#
The
AsyncCacheclass allows expensive asynchronouscomputations values to be cached for a period of time.The
AsyncMemoizerclass makes it easy to only run anasynchronous operation once on demand.The
CancelableOperationclass defines an operationthat can be canceled by its consumer. The producer can then listen for thiscancellation and stop producing the future when it's received. It can becreated using aCancelableCompleter.The delegating wrapper classes allow users to easily add functionality on topof existing instances of core types from
dart:async. These includeDelegatingFuture,DelegatingStream,DelegatingStreamSubscription,DelegatingStreamConsumer,DelegatingSink,DelegatingEventSink, andDelegatingStreamSink.The
FutureGroupclass makes it easy to wait until a group offutures that may change over time completes.The
LazyStreamclass allows a stream to be initialized lazilywhen.listen()is first called.The
NullStreamSinkclass is an implementation ofStreamSinkthat discards all events.The
RestartableTimerclass extendsTimerwith areset()method.The
Resultclass that can hold either a value or an error. Itprovides various utilities for converting to and fromFutures andStreams.The
StreamGroupclass merges a collection of streams into asingle output stream.The
StreamQueueclass allows a stream to be consumedevent-by-event rather than being pushed whichever events as soon as theyarrive.The
StreamSplitterclass allows a stream to be duplicatedinto multiple identical streams.The
StreamZipclass combines multiple streams into a singlestream of lists of events.This package contains a number of
StreamTransformers.SingleSubscriptionTransformerconverts abroadcast stream to a single-subscription stream, andtypedStreamTransformercasts the type of aStream. It also defines a transformer type forStreamSinks,StreamSinkTransformer.The
SubscriptionStreamclass wraps aStreamSubscriptionso it can be re-used as aStream.
Publishing automation#
For information about our publishing automation and release process, seehttps://github.com/dart-lang/ecosystem/wiki/Publishing-automation.
Publisher
Weekly Downloads
Metadata
Utility functions and classes related to the 'dart:async' library.
Repository (GitHub)
View/report issues
Contributing
Topics
Documentation
License
BSD-3-Clause (license)
Dependencies
More
← Metadata
Publisher
Weekly Downloads
Metadata
Utility functions and classes related to the 'dart:async' library.
Repository (GitHub)
View/report issues
Contributing
Topics
Documentation
License
BSD-3-Clause (license)