ReactiveX / rxdart

The Reactive Extensions for Dart
http://reactivex.io
Apache License 2.0
3.36k stars 272 forks source link

Use record in pairwise() #753

Open Albert221 opened 4 months ago

Albert221 commented 4 months ago

Hello!

We have records in Dart now. Let's use them as the pairwise() event type ((T, T) or ({T previous, T current})) instead of the current List<T>. The advantage of this would be that it would always have two values, not a list that could be accessed on an invalid index.

It would be a breaking change though.

hoc081098 commented 4 months ago

many Streams and operators (combineLatest, zip, ...)can use record types. I think we should create another pub lib that supports dart 3.0 instead