Skip to content

0.28.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 14 Jun 09:18
· 9 commits to master since this release

New

  • ValueStream:

    • Add lastEventOrNull getter to ValueStream,
      which returns the last emitted event (either data/value or error event), or null.
    • Add isLastEventValue, isLastEventError and errorAndStackTraceOrNull
      extension getters to ValueStream, to check the kind of the last emitted event is data/value or error.
    • Update documentation.
  • ReplayStream:

    • Add errorAndStackTraces to ReplayStream, which returns a list of emitted ErrorAndStackTraces.
  • Rename Notification and Kind to better reflect their purpose,
    and to avoid confusion with Flutter's Notification class.

    • Rename Notification to StreamNotification
      • Notification.onData to StreamNotification.data.
      • Notification.onDone to StreamNotification.done.
      • Notification.onError to StreamNotification.error.
    • Rename Kind to NotificationKind
      • Kind.onData to NotificationKind.data.
      • Kind.onError to NotificationKind.error.
      • Kind.onDone to NotificationKind.done.
    • Introduce DataNotification, ErrorNotification and DoneNotification as the subclasses of StreamNotification.
    • Convert isOnData, isOnError, isOnDone, requireData to extension getters on StreamNotification,
      they are now named isData, isError, isDone and requireDataValue.
    • Add extensions on StreamNotification: dataValueOrNull, requireErrorAndStackTrace, errorAndStackTraceOrNull getters and when method.

Changed

  • Accept Dart SDK versions above 3.0.

  • switchMap: when cancelling the previous inner subscription,
    switchMap will pause the outer subscription and and wait for the inner subscription to be completely canceled.
    It will then resume the outer subscription, and listen to the next inner Stream.
    Any errors from canceling the previous inner subscription will now be forwarded to the resulting Stream.

  • Breaking: Rename ForkJoinStream.combine2..combine9 to ForkJoinStream.join2..join9.

  • Breaking: Rx.using/UsingStream

    • Convert all required positional parameters to required named parameters.
    • The disposer is now called after the future returned from StreamSubscription.cancel completes.

Documentation