New
-
ValueStream:
- Add
lastEventOrNull
getter toValueStream
,
which returns the last emitted event (either data/value or error event), ornull
. - Add
isLastEventValue
,isLastEventError
anderrorAndStackTraceOrNull
extension getters toValueStream
, to check the kind of the last emitted event is data/value or error. - Update documentation.
- Add
-
ReplayStream:
- Add
errorAndStackTraces
toReplayStream
, which returns a list of emittedErrorAndStackTrace
s.
- Add
-
Rename
Notification
andKind
to better reflect their purpose,
and to avoid confusion with Flutter's Notification class.- Rename
Notification
toStreamNotification
Notification.onData
toStreamNotification.data
.Notification.onDone
toStreamNotification.done
.Notification.onError
toStreamNotification.error
.
- Rename
Kind
toNotificationKind
Kind.onData
toNotificationKind.data
.Kind.onError
toNotificationKind.error
.Kind.onDone
toNotificationKind.done
.
- Introduce
DataNotification
,ErrorNotification
andDoneNotification
as the subclasses ofStreamNotification
. - Convert
isOnData
,isOnError
,isOnDone
,requireData
to extension getters onStreamNotification
,
they are now namedisData
,isError
,isDone
andrequireDataValue
. - Add extensions on
StreamNotification
:dataValueOrNull
,requireErrorAndStackTrace
,errorAndStackTraceOrNull
getters andwhen
method.
- Rename
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
toForkJoinStream.join2
..join9
. -
Breaking:
Rx.using
/UsingStream
- Convert all required positional parameters to required named parameters.
- The
disposer
is now called after the future returned fromStreamSubscription.cancel
completes.
Documentation
- Update and fix documentation.
- Fix README example (thanks to @wurikiji).
- Update Flutter example (thanks to @hoangchungk53qx1).
- Replace deprecated "dart pub run" with "dart run" (thanks to @tatsuyafujisaki).