rxdart
rxdart copied to clipboard
Operator groupBy produces Streams with incorrect behavior
Code below works fine
.groupBy((event) => event.type)
.flatMap((groupByType) => groupByType.toSet().asStream())
But if you change to this - onNext never called because of groupByType.toSet() never completes
.groupBy((event) => event.type)
.asyncMap((groupByType) => groupByType.toSet())
rxdart: ^0.26.0
That is expected behavior
You can use scan((acc, e) => {...acc!, e}, <Object>{})
instead toSet()
@hoc081098 can you explain why this is expected behaviour?
@hoc081098 can you explain why this is expected behaviour?
Each group will complete when upstream (source stream) completes.
@hoc081098 Where I said what upstream never completes?) It just a stream from list.
@hoc081098 Where I said what upstream never completes?) It just a stream from list.
Could you provide some code to reproduce this issue? Thanks