Viewing version 0.3.2. Open the latest package page.

rxdart

0.3.2

Native Dart rx implementation

Download archive

Readme

rxdart

Build Status Coverage Status Pub

Update This library no longer depends on RxJs and JS interop, while that dependency made things easy, it also meant that rxdart would be a browser lib only.

Some notes:

  • Observable is the main class, it extends Stream obviously
  • Promote a stream to observable by wrapping it => rx.observable(myStream)
  • That doesn't mean wrapping everywhere, dart new rx.Observable.merge(<Stream>[a, b, c, ...]); is fine
  • Subject is not ported, we already have StreamController for that

Example:

void main() {
  List<int> codes = <int>[
      38, // up
      38, // up
      40, // down
      40, // down
      37, // left
      39, // right
      37, // left
      39, // right
      66, // b
      65  // a
  ];
  Element result = querySelector('#result');

  StreamController<KeyboardEvent> controller = new StreamController<KeyboardEvent>();
  rx.Observable<KeyboardEvent> stream = rx.observable(controller.stream);

  document.addEventListener('keyup', (KeyboardEvent event) => controller.add(event));

  stream
    .map((KeyboardEvent e) => e.keyCode )     // get the key code
    .bufferWithCount(10, 1)                   // get the last 10 keys
    .where((List<int> x) => _equal(x, codes)) // where we match
    .listen((_) => result.innerHtml = 'KONAMI!');
}

bool _equal(List<int> a, List<int> b) {
  for (int i=0; i<10; i++) if (a[i] != b[i]) return false; return true;
}
Changelog

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'rxdart:0.3.2'
pubspec.yaml
name: rxdart
version: 0.3.2
author: Frank Pepermans <frank@igindo.com>
description: Native Dart rx implementation
homepage: https://github.com/frankpepermans/rxdart
environment:
  sdk: '>1.12.0'
dependencies:
dev_dependencies:
  browser: ^0.10.0+2
  faker: ^0.0.4
  react: ^0.8.5
  test: ^0.12.5+1

Version history

VersionPublishedArchiveSHA-256
0.1.0Cached · Upstream SHA-256 matchedDownload7b2c6e72…523c15
0.1.0+1Cached · Upstream SHA-256 matchedDownloadd3b2922d…679f2a
0.1.0+2Cached · Upstream SHA-256 matchedDownloadedfa980c…d43a9b
0.1.0+3Cached · Upstream SHA-256 matchedDownloaddc82051d…0285ab
0.1.0+4Cached · Upstream SHA-256 matchedDownload39c33b63…bb88ce
0.1.0+5Cached · Upstream SHA-256 matchedDownloadb2e90d5e…96e23e
0.1.0+6Cached · Upstream SHA-256 matchedDownloade417d502…bb148e
0.2.0Cached · Upstream SHA-256 matchedDownload4fdc3a49…725854
0.2.0+1Cached · Upstream SHA-256 matchedDownload71d9f48f…f3879d
0.2.0+3Cached · Upstream SHA-256 matchedDownloadb7742d6d…daea85
0.3.0Cached · Upstream SHA-256 matchedDownload7eeca94a…2df1ed
0.3.1Cached · Upstream SHA-256 matchedDownloadfc0a390f…3415e3
0.3.2Cached · Upstream SHA-256 matchedDownload353a7970…100d09
0.3.3Cached · Upstream SHA-256 matchedDownload9276f3f4…23c6d5
0.3.4Cached · Upstream SHA-256 matchedDownload3fa075ce…7b5512
0.3.5Cached · Upstream SHA-256 matchedDownloadc6a63b6f…0bdb0b
0.3.6Cached · Upstream SHA-256 matchedDownload9695e85a…ae84a5
0.3.7Cached · Upstream SHA-256 matchedDownload5eb73e19…e1ba1a
0.3.8Cached · Upstream SHA-256 matchedDownload491112d8…41339d
0.3.8+1Cached · Upstream SHA-256 matchedDownload6e7b0d49…ce7b24
0.3.9Cached · Upstream SHA-256 matchedDownloadf3660828…9c9ecc
0.3.10Cached · Upstream SHA-256 matchedDownloadf2fa34eb…e31b70
0.3.11Cached · Upstream SHA-256 matchedDownloadb5c4093d…f1c0a8
0.3.12Cached · Upstream SHA-256 matchedDownloadefb6bc41…3ec0c3
0.3.13Cached · Upstream SHA-256 matchedDownloadb606e2b9…a97fdd
0.3.14Cached · Upstream SHA-256 matchedDownloaddd3a48de…129a13
0.3.15Cached · Upstream SHA-256 matchedDownload14cac08f…61d366
0.3.16Cached · Upstream SHA-256 matchedDownload45c18814…d6fd01
0.3.17Cached · Upstream SHA-256 matchedDownload472670ab…5b128b
0.3.18Cached · Upstream SHA-256 matchedDownload003af73f…e496cc
0.3.19Cached · Upstream SHA-256 matchedDownload83ea5ffd…0b8779
0.3.20Cached · Upstream SHA-256 matchedDownloadde431744…2ac9ab
0.3.21Cached · Upstream SHA-256 matchedDownload17c84b88…99609b
0.3.22Cached · Upstream SHA-256 matchedDownload5cb985a3…2e939a
0.3.24Cached · Upstream SHA-256 matchedDownload6baac2a7…c4ef60
0.3.25Cached · Upstream SHA-256 matchedDownload55b1b751…3d371f
0.4.0Cached · Upstream SHA-256 matchedDownloadf16b4c82…f1b045
0.4.1Cached · Upstream SHA-256 matchedDownloada78d65a3…b204ec
0.4.2Cached · Upstream SHA-256 matchedDownloadbff12d4e…331493
0.4.3Cached · Upstream SHA-256 matchedDownload95e65662…cbb822
0.4.4Cached · Upstream SHA-256 matchedDownload839ac5b0…c194d5
0.4.5Cached · Upstream SHA-256 matchedDownloada104543d…2fce1d
0.4.6Cached · Upstream SHA-256 matchedDownload9a272d97…292d0d
0.4.7Cached · Upstream SHA-256 matchedDownloadd62c6d02…a7a464
0.4.8Cached · Upstream SHA-256 matchedDownloadb6df4602…5f5e1f
0.5.0Cached · Upstream SHA-256 matchedDownloadaf8cbcbd…8167a7
0.5.1Cached · Upstream SHA-256 matchedDownloadc3c1a58f…2c9691
0.6.0Cached · Upstream SHA-256 matchedDownloadc4ebe9fd…55994a
0.6.1Cached · Upstream SHA-256 matchedDownload59e032b1…a36028
0.6.1+1Cached · Upstream SHA-256 matchedDownload8d218fbb…48c0b2
0.6.1+2Cached · Upstream SHA-256 matchedDownloade660f25c…01610f
0.6.2Cached · Upstream SHA-256 matchedDownload245a4d94…e2d7d9
0.6.2+1Cached · Upstream SHA-256 matchedDownload06bd3411…0436d4
0.6.3Cached · Upstream SHA-256 matchedDownloada5e57e36…f4a501
0.6.3+1Cached · Upstream SHA-256 matchedDownloadfba0cee1…596dc1
0.6.3+2Cached · Upstream SHA-256 matchedDownload261a1872…9b72a5
0.6.3+3Cached · Upstream SHA-256 matchedDownloada0dc3e2e…daa80d
0.6.3+4Cached · Upstream SHA-256 matchedDownload26d6714c…3e8c9a
0.6.3+5Cached · Upstream SHA-256 matchedDownload85e45a6e…e61b28
0.7.0Cached · Upstream SHA-256 matchedDownload511f6ced…df1e08
0.7.1Cached · Upstream SHA-256 matchedDownloade1a3868e…fa8e06
0.7.1+1Cached · Upstream SHA-256 matchedDownloade8635809…8b6691
0.8.0Cached · Upstream SHA-256 matchedDownload270cc269…58d957
0.8.1Cached · Upstream SHA-256 matchedDownloade4f6c2dd…385b6c
0.8.2Cached · Upstream SHA-256 matchedDownloadaf8fb9bf…1ec1d8
0.8.2+1Cached · Upstream SHA-256 matchedDownload27eb06b2…733192
0.8.2+2Cached · Upstream SHA-256 matchedDownload2d038075…c2b1b3
0.8.3+1Cached · Upstream SHA-256 matchedDownloadb8ece876…e86179
0.9.0Cached · Upstream SHA-256 matchedDownloada0e99914…f05176
0.10.0Cached · Upstream SHA-256 matchedDownload7ffd2c08…7cdcf2
0.10.1Cached · Upstream SHA-256 matchedDownload20d23b04…ca4f06
0.10.2Cached · Upstream SHA-256 matchedDownload7996ad01…53d9a1
0.11.0Cached · Upstream SHA-256 matchedDownload98d9da96…afacdf
0.12.0Cached · Upstream SHA-256 matchedDownloadd033fe80…3e3a6b
0.13.0Cached · Upstream SHA-256 matchedDownload18c6280d…d37fec
0.13.1Cached · Upstream SHA-256 matchedDownload0a94c626…edd512
0.14.0Cached · Upstream SHA-256 matchedDownload5fdd2cfc…a9ce71
0.14.0+1Cached · Upstream SHA-256 matchedDownload9d30cde3…ae177f
0.14.0+2Cached · Upstream SHA-256 matchedDownloada1e7dd1d…9939a1
0.15.0Cached · Upstream SHA-256 matchedDownload1a25d2da…699ef1
0.15.1Cached · Upstream SHA-256 matchedDownloade4133253…4b0378
0.16.0Cached · Upstream SHA-256 matchedDownload6b47d4ca…824efc
0.16.0+1Cached · Upstream SHA-256 matchedDownloadb53243a8…341ce9
0.16.0+2Cached · Upstream SHA-256 matchedDownloadae15fbca…5e47ea
0.16.1Cached · Upstream SHA-256 matchedDownload4c7c36b2…7e2678
0.16.2Cached · Upstream SHA-256 matchedDownloadce20f885…610bc2
0.16.3Cached · Upstream SHA-256 matchedDownload47531cc1…ab9d30
0.16.4Cached · Upstream SHA-256 matchedDownload1ec7cde3…6132ad
0.16.5Cached · Upstream SHA-256 matchedDownload3fee42bc…e41a28
0.16.6Cached · Upstream SHA-256 matchedDownloadc71a72d4…62f1c3
0.16.7Cached · Upstream SHA-256 matchedDownload4c2dedb2…aa84a6
0.17.0Cached · Upstream SHA-256 matchedDownloadb0d6865d…24959b
0.18.0Cached · Upstream SHA-256 matchedDownload864a5f32…72ba2e
0.18.1Cached · Upstream SHA-256 matchedDownload8f4130f9…9f7e0d
0.19.0Cached · Upstream SHA-256 matchedDownload4097cc92…19e131
0.20.0Cached · Upstream SHA-256 matchedDownload3f3b7a45…71ac6e
0.21.0Cached · Upstream SHA-256 matchedDownload18a5e310…d23bfb
0.22.0Cached · Upstream SHA-256 matchedDownload3b4c1c24…3a10c4
0.22.1Cached · Upstream SHA-256 matchedDownloadc934cbbb…31acbe
0.22.1+1Cached · Upstream SHA-256 matchedDownloada85b911a…432577
0.22.2Cached · Upstream SHA-256 matchedDownloadd3e28dab…88bb1d
0.22.3Cached · Upstream SHA-256 matchedDownload87acf1eb…e1d3e5
0.22.4Cached · Upstream SHA-256 matchedDownload916aa71a…a6c21d
0.22.5Cached · Upstream SHA-256 matchedDownload83c06171…276da5
0.22.6Cached · Upstream SHA-256 matchedDownload79022a7d…2e1241
0.23.0-dev.1Cached · Upstream SHA-256 matchedDownload0b03b203…8204de
0.23.0-dev.2Cached · Upstream SHA-256 matchedDownloadb2968d8b…265c98
0.23.0-dev.3Cached · Upstream SHA-256 matchedDownload685f66f6…687e34
0.23.0Cached · Upstream SHA-256 matchedDownload13455e1c…957209
0.23.1Cached · Upstream SHA-256 matchedDownload4bae6903…f35d88
0.24.0-dev.1Cached · Upstream SHA-256 matchedDownload11e59b31…f968a5
0.24.0Cached · Upstream SHA-256 matchedDownload09b328f6…1f1a2e
0.24.1Cached · Upstream SHA-256 matchedDownload0beed421…2aa97e
0.25.0-betaCached · Upstream SHA-256 matchedDownloadeb1ac150…fb494d
0.25.0-beta2Cached · Upstream SHA-256 matchedDownload6a055724…e5ae99
0.25.0-beta3Cached · Upstream SHA-256 matchedDownloadfb4eb6f4…aa37a5
0.25.0Cached · Upstream SHA-256 matchedDownloadc7cd7cee…d9e3c3
0.26.0-nullsafety.0Cached · Upstream SHA-256 matchedDownload540ef29a…48159c
0.26.0-nullsafety.1Cached · Upstream SHA-256 matchedDownloadee3719e8…8415fe
0.26.0Cached · Upstream SHA-256 matchedDownload2ef8b4e9…cc21fd
0.27.0Cached · Upstream SHA-256 matchedDownload3f7cb435…091f90
0.27.1Cached · Upstream SHA-256 matchedDownloade59cd262…e853d9
0.27.2Cached · Upstream SHA-256 matchedDownload7358d9e1…e3d5d6
0.27.3Cached · Upstream SHA-256 matchedDownloadbc2d2b17…39c46d
0.27.4Cached · Upstream SHA-256 matchedDownload933db292…2888cb
0.27.5Cached · Upstream SHA-256 matchedDownload5d22055f…b0209c
0.27.6Cached · Upstream SHA-256 matchedDownload46383ce2…1952bf
0.27.7Cached · Upstream SHA-256 matchedDownload0c7c0ced…0044cb
0.28.0-dev.0Cached · Upstream SHA-256 matchedDownload93bca4fe…c82cdf
0.28.0-dev.1Cached · Upstream SHA-256 matchedDownload5a11abd6…6be690
0.28.0-dev.2Cached · Upstream SHA-256 matchedDownloade5507e36…378d3c
0.28.0Cached · Upstream SHA-256 matchedDownload5c3004a4…d1a962

Dependencies

No direct dependencies declared.