Upgrading rxdart 0.24 to 0.25
Breaking0.24.1 → 0.25.0Breaking3New4Changed5Fixed7Other4
BreakingUpgrade verdict
3 breaking changes.
In plain terms
- Error information from these streams now includes the stack trace, but the old property names no longer exist.
- doOnError now has a strong type signature taking void Function(Object, StackTrace).
- When you transform a ValueStream, you now get a ValueStream back rather than a plain broadcast stream.
Must act 3 items need code or config changes
What you must change
Breaking3
ValueStream and ReplayStream now expose stackTrace alongside error, renaming error and errors members.
ValueStreamValueStream.errorValueStream.errorAndStackTraceReplayStreamReplayStream.errorsReplayStream.errorAndStackTracesNotification.errorNotification.errorAndStackTracedoOnError now has a strong type signature taking void Function(Object, StackTrace).
doOnErrorStream transformations on a ValueStream now return a ValueStream instead of a standard broadcast Stream.
ValueStreamAPI changes
Generated by DepDelta from published Dart source. Not mixed with prose notes.
- removed:
class ErrorAndStacktrace - removed:
ctor ErrorAndStacktrace(this.error, this.stackTrace) - removed:
ctor Notification(this.kind, this.value, this.error, this.stackTrace) - removed:
field DoStreamTransformer.onError: final Function - removed:
field ErrorAndStacktrace.error: final dynamic - removed:
field ErrorAndStacktrace.stackTrace: final StackTrace - removed:
field Notification.error: final dynamic - removed:
field Notification.stackTrace: final StackTrace - removed:
field StartWithStreamTransformer.sync: final bool - removed:
get ErrorAndStacktrace.hashCode: int - removed:
get ReplayConnectableStream.errors: List<Object> - removed:
get ReplayStream.errors: List<Object> - removed:
get ReplaySubject.errors: List<Object> - removed:
method ErrorAndStacktrace.operator ==(Object other): bool - removed:
method ErrorAndStacktrace.toString(): String - changed:
ctor Notification.onError(dynamic error, StackTrace stackTrace) → ctor Notification.onError(Object error, StackTrace stackTrace) - changed:
ctor RetryError.onReviveFailed(List<ErrorAndStacktrace> errors) → ctor RetryError.onReviveFailed(List<ErrorAndStackTrace> errors) - changed:
ctor RetryError.withCount(int count, List<ErrorAndStacktrace> errors) → ctor RetryError.withCount(int count, List<ErrorAndStackTrace> errors) - changed:
ctor StartWithStreamTransformer(this.startValue, {this.sync = …}) → ctor StartWithStreamTransformer(this.startValue) - changed:
ctor ThrottleStreamTransformer( Stream Function(T event) window, { bool trailing = …, }) → ctor ThrottleStreamTransformer( Stream Function(T event) window, { bool trailing = …, bool leading = …, }) - changed:
field RetryError.errors: final List<ErrorAndStacktrace> → field RetryError.errors: final List<ErrorAndStackTrace> - changed:
method CompositeSubscription.pauseAll([Future resumeSignal]): void → method CompositeSubscription.pauseAll([Future<void> resumeSignal]): void - changed:
method ConnectableStreamSubscription.pause([Future<dynamic> resumeSignal]): void → method ConnectableStreamSubscription.pause([Future<void> resumeSignal]): void - changed:
method DoExtensions.doOnError(Function onError): Stream<T> → method DoExtensions.doOnError(void Function(Object, StackTrace) onError): Stream<T> - changed:
method DoExtensions.doOnPause(void Function(Future<dynamic> resumeSignal) onPause): Stream<T> → method DoExtensions.doOnPause(void Function() onPause): Stream<T> - changed:
method DoStreamTransformer.Function(Future<dynamic> resumeSignal): void → method DoStreamTransformer.Function(Object, StackTrace): void - changed:
method ThrottleExtensions.throttle(Stream Function(T event) window, {bool trailing = …}): Stream<T> → method ThrottleExtensions.throttle(Stream Function(T event) window, {bool trailing = …, bool leading = …}): Stream<T> - changed:
method ThrottleExtensions.throttleTime(Duration duration, {bool trailing = …}): Stream<T> → method ThrottleExtensions.throttleTime(Duration duration, {bool trailing = …, bool leading = …}): Stream<T> - added:
class ErrorAndStackTrace - added:
class FromCallableStream<T> extends Stream<T> - added:
class UsingStream<T, R> extends StreamView<T> - added:
ctor ErrorAndStackTrace(this.error, this.stackTrace) - added:
ctor FromCallableStream(this.callable, {bool reusable = …}) - added:
ctor UsingStream( R Function() resourceFactory, Stream<T> Function(R) streamFactory, FutureOr<void> Function(R) disposer, ) - added:
field ErrorAndStackTrace.error: final Object - added:
field ErrorAndStackTrace.stackTrace: final StackTrace - added:
field Notification.errorAndStackTrace: final ErrorAndStackTrace - added:
get BehaviorSubject.errorAndStackTrace: ErrorAndStackTrace - added:
get BehaviorSubject.hasError: bool - added:
get ErrorAndStackTrace.hashCode: int - added:
get FromCallableStream.isBroadcast: bool - added:
get ReplayConnectableStream.errorAndStackTraces: List<ErrorAndStackTrace> - added:
get ReplayStream.errorAndStackTraces: List<ErrorAndStackTrace> - added:
get ReplaySubject.errorAndStackTraces: List<ErrorAndStackTrace> - added:
get ValueConnectableStream.errorAndStackTrace: ErrorAndStackTrace - added:
get ValueConnectableStream.hasError: bool - added:
get ValueStream.errorAndStackTrace: ErrorAndStackTrace - added:
get ValueStream.hasError: bool - added:
method BehaviorSubject.asyncExpand<E>(Stream<E> Function(T event) convert): ValueStream<E> - added:
method BehaviorSubject.asyncMap<E>(FutureOr<E> Function(T event) convert): ValueStream<E> - added:
method BehaviorSubject.cast<R>(): ValueStream<R> - added:
method BehaviorSubject.createForwardingSubject<R>({ void Function() onListen, void Function() onCancel, bool sync = …, }): BehaviorSubject<R> - added:
method BehaviorSubject.distinct([bool Function(T previous, T next) equals]): ValueStream<T> - added:
method BehaviorSubject.expand<S>(Iterable<S> Function(T element) convert): ValueStream<S> - added:
method BehaviorSubject.handleError(Function onError, {bool Function(Object error) test}): ValueStream<T> - added:
method BehaviorSubject.map<S>(S Function(T event) convert): ValueStream<S> - added:
method BehaviorSubject.skip(int count): ValueStream<T> - added:
method BehaviorSubject.skipWhile(bool Function(T element) test): ValueStream<T> - added:
method BehaviorSubject.take(int count): ValueStream<T> - added:
method BehaviorSubject.takeWhile(bool Function(T element) test): ValueStream<T> - added:
method BehaviorSubject.timeout(Duration timeLimit, {void Function(EventSink<T> sink) onTimeout}): ValueStream<T> - added:
method BehaviorSubject.transform<S>(StreamTransformer<T, S> streamTransformer): ValueStream<S> - added:
method BehaviorSubject.where(bool Function(T event) test): ValueStream<T> - added:
method ErrorAndStackTrace.operator ==(Object other): bool - added:
method ErrorAndStackTrace.toString(): String - added:
method FromCallableStream.Function(): FutureOr<T> - added:
method FromCallableStream.listen( void Function(T event) onData, { Function onError, void Function() onDone, bool cancelOnError, }): StreamSubscription<T> - added:
method PublishSubject.createForwardingSubject<R>({ void Function() onListen, void Function() onCancel, bool sync = …, }): PublishSubject<R> - added:
method ReplaySubject.createForwardingSubject<R>({ void Function() onListen, void Function() onCancel, bool sync = …, }): ReplaySubject<R> - added:
method Subject.createForwardingSubject<R>({ void Function() onListen, void Function() onCancel, bool sync = …, }): Subject<R> - added:
static method Rx.fromCallable<T>(FutureOr<T> Function() callable, {bool reusable = …}): Stream<T> - added:
static method Rx.using<T, R>( R Function() resourceFactory, Stream<T> Function(R) streamFactory, FutureOr<void> Function(R) disposer, ): Stream<T>
- removed:
class ErrorAndStacktrace - removed:
ctor ErrorAndStacktrace(this.error, this.stackTrace) - removed:
field ErrorAndStacktrace.error: final dynamic - removed:
field ErrorAndStacktrace.stackTrace: final StackTrace - removed:
get ErrorAndStacktrace.hashCode: int - removed:
get ReplayConnectableStream.errors: List<Object> - removed:
get ReplayStream.errors: List<Object> - removed:
method ErrorAndStacktrace.operator ==(Object other): bool - removed:
method ErrorAndStacktrace.toString(): String - changed:
ctor RetryError.onReviveFailed(List<ErrorAndStacktrace> errors) → ctor RetryError.onReviveFailed(List<ErrorAndStackTrace> errors) - changed:
ctor RetryError.withCount(int count, List<ErrorAndStacktrace> errors) → ctor RetryError.withCount(int count, List<ErrorAndStackTrace> errors) - changed:
field RetryError.errors: final List<ErrorAndStacktrace> → field RetryError.errors: final List<ErrorAndStackTrace> - changed:
method ConnectableStreamSubscription.pause([Future<dynamic> resumeSignal]): void → method ConnectableStreamSubscription.pause([Future<void> resumeSignal]): void - added:
class FromCallableStream<T> extends Stream<T> - added:
class UsingStream<T, R> extends StreamView<T> - added:
ctor FromCallableStream(this.callable, {bool reusable = …}) - added:
ctor UsingStream( R Function() resourceFactory, Stream<T> Function(R) streamFactory, FutureOr<void> Function(R) disposer, ) - added:
get FromCallableStream.isBroadcast: bool - added:
get ReplayConnectableStream.errorAndStackTraces: List<ErrorAndStackTrace> - added:
get ReplayStream.errorAndStackTraces: List<ErrorAndStackTrace> - added:
get ValueConnectableStream.errorAndStackTrace: ErrorAndStackTrace - added:
get ValueConnectableStream.hasError: bool - added:
get ValueStream.errorAndStackTrace: ErrorAndStackTrace - added:
get ValueStream.hasError: bool - added:
method FromCallableStream.Function(): FutureOr<T> - added:
method FromCallableStream.listen( void Function(T event) onData, { Function onError, void Function() onDone, bool cancelOnError, }): StreamSubscription<T>
- removed:
get ReplaySubject.errors: List<Object> - added:
get BehaviorSubject.errorAndStackTrace: ErrorAndStackTrace - added:
get BehaviorSubject.hasError: bool - added:
get ReplaySubject.errorAndStackTraces: List<ErrorAndStackTrace> - added:
method BehaviorSubject.asyncExpand<E>(Stream<E> Function(T event) convert): ValueStream<E> - added:
method BehaviorSubject.asyncMap<E>(FutureOr<E> Function(T event) convert): ValueStream<E> - added:
method BehaviorSubject.cast<R>(): ValueStream<R> - added:
method BehaviorSubject.createForwardingSubject<R>({ void Function() onListen, void Function() onCancel, bool sync = …, }): BehaviorSubject<R> - added:
method BehaviorSubject.distinct([bool Function(T previous, T next) equals]): ValueStream<T> - added:
method BehaviorSubject.expand<S>(Iterable<S> Function(T element) convert): ValueStream<S> - added:
method BehaviorSubject.handleError(Function onError, {bool Function(Object error) test}): ValueStream<T> - added:
method BehaviorSubject.map<S>(S Function(T event) convert): ValueStream<S> - added:
method BehaviorSubject.skip(int count): ValueStream<T> - added:
method BehaviorSubject.skipWhile(bool Function(T element) test): ValueStream<T> - added:
method BehaviorSubject.take(int count): ValueStream<T> - added:
method BehaviorSubject.takeWhile(bool Function(T element) test): ValueStream<T> - added:
method BehaviorSubject.timeout(Duration timeLimit, {void Function(EventSink<T> sink) onTimeout}): ValueStream<T> - added:
method BehaviorSubject.transform<S>(StreamTransformer<T, S> streamTransformer): ValueStream<S> - added:
method BehaviorSubject.where(bool Function(T event) test): ValueStream<T> - added:
method PublishSubject.createForwardingSubject<R>({ void Function() onListen, void Function() onCancel, bool sync = …, }): PublishSubject<R> - added:
method ReplaySubject.createForwardingSubject<R>({ void Function() onListen, void Function() onCancel, bool sync = …, }): ReplaySubject<R> - added:
method Subject.createForwardingSubject<R>({ void Function() onListen, void Function() onCancel, bool sync = …, }): Subject<R>
- removed:
class Notification<T> - removed:
ctor Notification(this.kind, this.value, this.error, this.stackTrace) - removed:
ctor Notification.onData(T value) - removed:
ctor Notification.onDone() - removed:
ctor Notification.onError(dynamic error, StackTrace stackTrace) - removed:
enum Kind - removed:
field DoStreamTransformer.onError: final Function - removed:
field Notification.error: final dynamic - removed:
field Notification.kind: final Kind - removed:
field Notification.stackTrace: final StackTrace - removed:
field Notification.value: final T - removed:
field StartWithStreamTransformer.sync: final bool - removed:
get Notification.hashCode: int - removed:
get Notification.isOnData: bool - removed:
get Notification.isOnDone: bool - removed:
get Notification.isOnError: bool - removed:
member Kind.OnData - removed:
member Kind.OnDone - removed:
member Kind.OnError - removed:
method Notification.operator ==(Object other): bool - removed:
method Notification.toString(): String - changed:
ctor StartWithStreamTransformer(this.startValue, {this.sync = …}) → ctor StartWithStreamTransformer(this.startValue) - changed:
ctor ThrottleStreamTransformer( Stream Function(T event) window, { bool trailing = …, }) → ctor ThrottleStreamTransformer( Stream Function(T event) window, { bool trailing = …, bool leading = …, }) - changed:
method DoExtensions.doOnError(Function onError): Stream<T> → method DoExtensions.doOnError(void Function(Object, StackTrace) onError): Stream<T> - changed:
method DoExtensions.doOnPause(void Function(Future<dynamic> resumeSignal) onPause): Stream<T> → method DoExtensions.doOnPause(void Function() onPause): Stream<T> - changed:
method DoStreamTransformer.Function(Future<dynamic> resumeSignal): void → method DoStreamTransformer.Function(Object, StackTrace): void - changed:
method ThrottleExtensions.throttle(Stream Function(T event) window, {bool trailing = …}): Stream<T> → method ThrottleExtensions.throttle(Stream Function(T event) window, {bool trailing = …, bool leading = …}): Stream<T> - changed:
method ThrottleExtensions.throttleTime(Duration duration, {bool trailing = …}): Stream<T> → method ThrottleExtensions.throttleTime(Duration duration, {bool trailing = …, bool leading = …}): Stream<T>