Releases: ReactiveX/rxdart
Releases · ReactiveX/rxdart
Refactors backpressure
This version includes refactoring for the backpressure operators:
- Breaking Change:
debounce
is now split intodebounce
anddebounceTime
. - Breaking Change:
sample
is now split intosample
andsampleTime
. - Breaking Change:
throttle
is now split intothrottle
andthrottleTime
.
Fixes and new Features
- Breaking Change:
BehaviorSubject
now has a separate factory constructorseeded()
This allows you to seed this Subject with anull
value. - Breaking Change:
BehaviorSubject
will now emit anError
, if the last event was also anError
.
Before, when anError
occurred before alisten
, the subscriber would not be notified of thatError
.
To refactor, simply change all occurences ofBehaviorSubject(seedValue: value)
toBehaviorSubject.seeded(value)
- Added the
groupBy
operator - Bugix:
doOnCancel
: will now await the cancel result, if it is aFuture
. - Removed:
bufferWithCount
,windowWithCount
,tween
Please usebufferCount
andwindowCount
,tween
is removed, because it never was an official Rx spec. - Updated Flutter example to work with the latest Flutter stable.
fixes and new features
- Breaking Change: bufferCount had buggy behavior when using
startBufferEvery
(wasskip
previously)
If you were relying on bufferCount withskip
greater than 1 before, then you may have noticed
erroneous behavior.- Breaking Change:
repeat
is no longer an operator which simply repeats the last emitted event n-times,
instead this is now an Observable factory method which takes a StreamFactory and a count parameter.
This will cause each repeat cycle to create a fresh Observable sequence. mapTo
is a new operator, which works just likemap
, but instead of taking a mapper Function, it takes
a single value where each event is mapped to.- Bugfix: switchIfEmpty now correctly calls onDone
- combineLatest and zip can now take any amount of Streams:
- combineLatest2-9 & zip2-9 functionality unchanged, but now use a new path for construction.
- adds combineLatest and zipLatest which allows you to pass through an Iterable<Stream> and a combiner that takes a List when any source emits a change.
- adds combineLatestList / zipList which allows you to take in an Iterable<Stream> and emit a Observable<List> with the values. Just a convenience factory if all you want is the list!
- Constructors are provided by the Stream implementation directly
- Bugfix: Subjects that are transformed will now correctly return a new Observable where isBroadcast is true (was false before)
- Remove deprecated operators which were replaced long ago:
bufferWithCount
,windowWithCount
,amb
,flatMapLatest
- Breaking Change:
Async Bugfixes
- Fix error with FlatMapLatest where it was not properly cancelled in some scenarios
- Remove additional async methods on Stream handlers unless they're shown to solve a problem
Proper error handling, remove `call`
- Remove
call
operator /StreamTransformer
entirely. Please usedo
/DoStreamTransformer
. - Important bug fix: Errors thrown within any Stream or Operator will now be properly sent to the
StreamSubscription
. - Improve overall handling of errors throughout the library to ensure they're handled correctly
doOnX and distinctUnique
- Added doOn* operators in place of
call
. - Added
DoStreamTransformer
as a replacement forCallStreamTransformer
- Deprecated
call
andCallStreamTransformer
. Please use the appropriatedoOnX
operator / transformer. - Added
distinctUnique
. Emits items if they've never been emitted before. Same as to Rx#distinct.
Remove GroupBy
Breaking Api Change
- Observable.groupBy has been removed in order to be compatible with the next version of the
Stream
class in Dart 1.24.0, which includes this method
Small documentation fixes
- Remove ConcatMap link
- Change BehaviorSubject link
Closing in on 1.0-beta
- Api Changes
- Observable
- Remove all deprecated methods, including:
observable
factory -- replaced by the constructornew Observable()
combineLatest
-- replaced by Strong-Mode versionscombineLatest2
-combineLatest9
zip
-- replaced by Strong-Mode versionszip2
-zip9
- Support
asObservable
conversion from Future-returning methods. e.g.new Observable.fromIterable([1, 2]).first.asObservable()
- Max and Min now return a Future of the Max or Min value, rather than a stream of increasing or decreasing values.
- Add
cast
operator - Remove
ConcatMapStreamTransformer
-- functionality is already supported byasyncExpand
. Keep theconcatMap
method as an alias.
- Remove all deprecated methods, including:
- Subjects
- BehaviourSubject has been renamed to BehaviorSubject
- The subjects have been rewritten and include far more testing
- In keeping with the Rx idea of Subjects, they are broadcast-only
- Observable
- Documentation -- extensive documentation has been added to the library with explanations and examples for each Future, Stream & Transformer.
- Docs detailing the differences between RxDart and raw Observables.