From ed1f145e0c8324fda0416c807a4ddee8a29f66ba Mon Sep 17 00:00:00 2001 From: josteveadekanbi Date: Sun, 30 Apr 2023 17:36:15 +0100 Subject: [PATCH 1/3] docs: Add PublishSubject description to README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4a07ea254..e5800ed1c 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,8 @@ Dart provides the [StreamController](https://api.dart.dev/stable/dart-async/Stre - [BehaviorSubject](https://pub.dev/documentation/rxdart/latest/rx/BehaviorSubject-class.html) - A broadcast StreamController that caches the latest added value or error. When a new listener subscribes to the Stream, the latest value or error will be emitted to the listener. Furthermore, you can synchronously read the last emitted value. - [ReplaySubject](https://pub.dev/documentation/rxdart/latest/rx/ReplaySubject-class.html) - A broadcast StreamController that caches the added values. When a new listener subscribes to the Stream, the cached values will be emitted to the listener. +- [PublishSubject](https://pub.dev/documentation/rxdart/latest/rx/PublishSubject-class.html) - A broadcast StreamController that emits data only to active listeners. When a new listener subscribes to the Stream, it will only receive values added to the PublishSubject after the subscription. Previous values added to the PublishSubject before the subscription will not be emitted to the new listener. + ## Rx Observables vs Dart Streams From 52f3d638614641bdc1cd138991913926ba255a90 Mon Sep 17 00:00:00 2001 From: josteveadekanbi Date: Sun, 30 Apr 2023 17:40:26 +0100 Subject: [PATCH 2/3] changed 'data' to 'values' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e5800ed1c..baa6a8996 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ Dart provides the [StreamController](https://api.dart.dev/stable/dart-async/Stre - [BehaviorSubject](https://pub.dev/documentation/rxdart/latest/rx/BehaviorSubject-class.html) - A broadcast StreamController that caches the latest added value or error. When a new listener subscribes to the Stream, the latest value or error will be emitted to the listener. Furthermore, you can synchronously read the last emitted value. - [ReplaySubject](https://pub.dev/documentation/rxdart/latest/rx/ReplaySubject-class.html) - A broadcast StreamController that caches the added values. When a new listener subscribes to the Stream, the cached values will be emitted to the listener. -- [PublishSubject](https://pub.dev/documentation/rxdart/latest/rx/PublishSubject-class.html) - A broadcast StreamController that emits data only to active listeners. When a new listener subscribes to the Stream, it will only receive values added to the PublishSubject after the subscription. Previous values added to the PublishSubject before the subscription will not be emitted to the new listener. +- [PublishSubject](https://pub.dev/documentation/rxdart/latest/rx/PublishSubject-class.html) - A broadcast StreamController that emits values only to active listeners. When a new listener subscribes to the Stream, it will only receive values added to the PublishSubject after the subscription. Previous values added to the PublishSubject before the subscription will not be emitted to the new listener. ## Rx Observables vs Dart Streams From a21a48492443f0d986047daa3783bd90d6d60abc Mon Sep 17 00:00:00 2001 From: josteveadekanbi Date: Wed, 10 May 2023 10:23:52 +0100 Subject: [PATCH 3/3] update: changed 'two' to 'three' in the readme subjects description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index baa6a8996..700768f82 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ Stream.fromIterable([1, 2, 3]) ### Subjects -Dart provides the [StreamController](https://api.dart.dev/stable/dart-async/StreamController-class.html) class to create and manage a Stream. RxDart offers two additional StreamControllers with additional capabilities, known as Subjects: +Dart provides the [StreamController](https://api.dart.dev/stable/dart-async/StreamController-class.html) class to create and manage a Stream. RxDart offers three additional StreamControllers with additional capabilities, known as Subjects: - [BehaviorSubject](https://pub.dev/documentation/rxdart/latest/rx/BehaviorSubject-class.html) - A broadcast StreamController that caches the latest added value or error. When a new listener subscribes to the Stream, the latest value or error will be emitted to the listener. Furthermore, you can synchronously read the last emitted value. - [ReplaySubject](https://pub.dev/documentation/rxdart/latest/rx/ReplaySubject-class.html) - A broadcast StreamController that caches the added values. When a new listener subscribes to the Stream, the cached values will be emitted to the listener.