pub repository
mirror.p-hatan.irstream_transform
0.0.14+1A collection of utilities to transform and manipulate streams.
Readme
Utility methods to create StreamTransfomer instances to manipulate Streams.
asyncMapBuffer
Like asyncMap but events are buffered in a List until previous events have
been processed rather than being called for each element individually.
asyncWhere
Like where but allows an asynchronous predicate.
audit
Audit waits for a period of time after receiving a value and then only emits the most recent value.
buffer
Collects values from a source stream until a trigger stream fires and the
collected values are emitted.
debounce, debounceBuffer
Prevents a source stream from emitting too frequently by dropping or collecting values that occur within a given duration.
concurrentAsyncMap
Like asyncMap but the convert callback can be called with subsequent values
before it has finished for previous values.
followedBy
Appends the values of a stream after another stream finishes.
merge, mergeAll
Interleaves events from multiple streams into a single stream.
scan
Scan is like fold, but instead of producing a single value it yields each intermediate accumulation.
startWith, startWithMany, startWithStream
Prepend a value, an iterable, or a stream to the beginning of another stream.
switchMap, switchLatest
Flatten a Stream of Streams into a Stream which forwards values from the most recent Stream
takeUntil
Let values through until a Future fires.
tap
Taps into a single-subscriber stream to react to values as they pass, without being a real subscriber.
throttle
Blocks events for a duration after an event is successfully emitted.
Changelog
0.0.14+1
- Allow using non-dev Dart 2 SDK.
0.0.14
asyncWherewill now forward exceptions thrown by the callback through the result Stream.- Added
concurrentAsyncMap.
0.0.13
mergeAllnow accepts anIterable<Stream>instead of onlyList<Stream>.
0.0.12
- Add
chainTransformersandmapfor use cases whereStreamTransformerinstances are stored as variables or passed to methods other thantransform.
0.0.11
- Renamed
concatasfollowedByto match the naming ofIterable.followedBy.concatis now deprecated.
0.0.10
-
Updates to support Dart 2.0 core library changes (wave 2.2). See issue 31847 for details.
0.0.9
- Add
asyncMapBuffer.
0.0.8
- Add
takeUntil.
0.0.7
- Bug Fix: Streams produced with
scanandswitchMapnow correctly reportisBroadcast. - Add
startWith,startWithMany, andstartWithStream.
0.0.6
- Bug Fix: Some transformers did not correctly add data to all listeners on
broadcast streams. Fixed for
throttle,debounce,asyncWhereandaudit. - Bug Fix: Only call the
tapdata callback once per event rather than once per listener. - Bug Fix: Allow canceling and re-listening to broadcast streams after a
mergetransform. - Bug Fix: Broadcast streams which are buffered using a single-subscription trigger can be canceled and re-listened.
- Bug Fix: Buffer outputs one more value if there is a pending trigger before the trigger closes.
- Bug Fix: Single-subscription streams concatted after broadcast streams are handled correctly.
- Use sync
StreamControllersfor forwarding where possible.
0.0.5
- Bug Fix: Allow compiling switchLatest with Dart2Js.
- Add
asyncWhere: Likewherebut allows an asynchronous predicate.
0.0.4
- Add
scan: fold which returns intermediate values - Add
throttle: block events for a duration after emitting a value - Add
audit: emits the last event received after a duration
0.0.3
- Add
tap: React to values as they pass without being a subscriber on a stream - Add
switchMapandswitchLatest: Flatten a Stream of Streams into a Stream which forwards values from the most recent Stream
0.0.2
- Add
concat: Appends streams in series - Add
mergeandmergeAll: Interleaves streams
0.0.1
- Initial release with the following utilities:
buffer: Collects events in aListuntil atriggerstream fires.debounce,debounceBuffer: Collect or drop events which occur closer in time than a given duration.
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add stream_transformpubspec.yaml
name: stream_transform
description: A collection of utilities to transform and manipulate streams.
author: Dart Team <misc@dartlang.org>
homepage: https://www.github.com/dart-lang/stream_transform
version: 0.0.14+1
environment:
sdk: ">=2.0.0-dev.20.0 <3.0.0"
dev_dependencies:
test: ^0.12.20+13
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.0.1 | 2017-05-02T21:18:12.730976Z | Download | 574973b1a61c9ccd5e7f1a021af3ed3c1508c80513da830edc33377c58d5e52d |
| 0.0.2 | 2017-05-05T18:25:02.549723Z | Download | d56853ca1013ec34229cc3db4524d842013767e35f1dfa988d7f163e7c098d82 |
| 0.0.3 | 2017-05-06T01:17:59.200588Z | Download | f60711efe4ad54f8afca1ccef2377d5d26a691f3ad82587f2d0f17107b87c136 |
| 0.0.4 | 2017-05-07T05:08:23.736115Z | Download | cdf3c3f60572c66348108d601ccd3b2e7b52e7efc2f10a7300bbadbf29571d7e |
| 0.0.5 | 2017-05-08T19:29:30.337971Z | Download | 1261b0e7ec7525faf894ac06bda390565f0c07dfcb789b42ff63978ca0b56ce8 |
| 0.0.6 | 2017-07-11T17:49:52.346766Z | Download | e77719c678540bde6f7f6745abbf79c5f740380b54feb371f4e20f2bef178ea0 |
| 0.0.7 | 2017-07-12T21:37:21.881557Z | Download | 0391cd3116fa81bd4d1a70ed8cd759b154fee516c9b82d1b72b5be5f6e869c6b |
| 0.0.8 | 2017-08-04T21:29:35.335027Z | Download | 56a2a2cfe3fcaa79dc80e5c0e53955d864d5dbbaf8672b6b3db15e0434a0c024 |
| 0.0.9 | 2017-08-07T17:50:45.071548Z | Download | a5b9ed095a4c82420c9a99f0e91d036754b0e4d71a9bf168c937de54db127b67 |
| 0.0.10 | 2018-02-01T17:36:18.358790Z | Download | 7c196f513c7722cdb88d2d97daeab1059b17564047729c06ff1094047a5bcd04 |
| 0.0.11 | 2018-03-26T21:54:37.981388Z | Download | 9ee052a3a9046bb255244f6560664de78907b81d03ceda925632de481ce7a441 |
| 0.0.12 | 2018-06-01T22:54:20.690496Z | Download | 5439ecb76e650162a8ff5be25aae5981b5eccb437facade133d5daaac73aae9c |
| 0.0.13 | 2018-06-08T19:40:12.169781Z | Download | 2285694dfcc6da252ed408088bc03ccfa510b3fc29e6c49624776f71700660ac |
| 0.0.14 | 2018-06-13T23:18:37.103439Z | Download | 8b26d738f6d22bf7e624e6dee8315fc4e7b3a03e0b9d8a6c65f00fc291ad63ec |
| 0.0.14+1 | 2018-07-18T22:32:17.283866Z | Download | f0f15c31335a1e8ab4985f87562a729dab2e6e26d09d74ce2beb971ff37f5bf0 |
| 0.0.15 | 2019-02-12T23:44:03.199387Z | Download | e89b3f1ce122c9094c4989cba732c7196f550672925a3d25eb7b501659f943a2 |
| 0.0.16 | 2019-03-12T22:16:35.569606Z | Download | a2afa57962a504bc99ded884e223e8e6a3d617011f2f95556ae2a7008f9cae77 |
| 0.0.16+1 | 2019-03-13T17:02:43.561690Z | Download | dac417bcb952ddb4e72ee6bbac84b58b89de38cc057b88fd3cb9e433da2d821e |
| 0.0.17 | 2019-03-26T16:40:37.009736Z | Download | 2d2b417fe44d5801abdf06152f76abd2afa9b0887706c93acc14b5d073dea838 |
| 0.0.18 | 2019-04-29T16:21:13.938771Z | Download | 49b1ae26e6bfe121084194bc5685edcea894bf91ed8ea01b80a6e7120800e230 |
| 0.0.19 | 2019-05-03T18:25:14.940260Z | Download | 030527e0c0ca872fae40bb8cbc357a4b181cc8890e260f2d62f824c364e275a4 |
| 0.0.20 | 2019-11-05T21:24:00.648789Z | Download | e3ed6b5a9cac7b13e9a3c72abc360875538a133452a95b4f897bf73e626d2bf3 |
| 1.0.0 | 2019-11-20T21:38:34.753041Z | Download | 7ee84c48c00b0cf3561bba6de3b06f67d0fdb39824fd1b9ebb773ce5de697c77 |
| 1.1.0 | 2019-12-03T23:09:21.926102Z | Download | fb066a7c89d75af88be7e0f5c1d893057298d8420154d61757d729a750cfc526 |
| 1.2.0 | 2020-02-26T19:08:01.293710Z | Download | 0727efc56e75321979e4e29c4b0dd26885b689fef7f35262ed9b4f5e4a52454a |
| 2.0.0-nullsafety.0 | 2021-01-13T21:21:37.589884Z | Download | 6a3b7bde2d886ddb1f9f26cf3cb9eef6fe645c6a9ecf9a3f616060b45fbcc971 |
| 2.0.0 | 2021-02-08T20:39:42.781950Z | Download | ed464977cb26a1f41537e177e190c67223dbd9f4f683489b6ab2e5d211ec564e |
| 2.0.1 | 2022-10-05T22:12:13.399222Z | Download | f1d172e22a5432c042b5adfa9aff621372e4292231d9d73ad00f486ad01c2395 |
| 2.1.0 | 2022-11-03T20:39:57.865165Z | Download | 14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f |
| 2.1.1 | 2024-12-17T09:48:24.198454Z | Download | ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 |
| 2.1.2 | 2026-08-28T20:42:55.240271Z | Download | a00e5f18bffc764f923e7dec1038527f7fe7a1791361a7117f0358193f13d53a |
Dependencies
No direct dependencies declared.