Rxdart: add takeUntilCompleted

Created on 17 May 2021  路  4Comments  路  Source: ReactiveX/rxdart

Edit: could we have takeUntilCompleted that acts like takeUntil but instead finishes when the stream passed as param completes ?

Most helpful comment

Just use takeUntil and ignoreElements :))

takeUntilCompleted(stream) = takeUntil(stream.ignoreElements())

All 4 comments

You can publish a lib, such as my lib (focusing on did_change_dependencies) https://github.com/hoc081098/did_change_dependencies/blob/master/lib/src/did_change_dependencies.dart :))

I'm on the wrong repository, I thought this was the bloc package. Still I think a takeUntilCompleted would be a nice addition. I'll edit my comment above

Just use takeUntil and ignoreElements :))

takeUntilCompleted(stream) = takeUntil(stream.ignoreElements())

has become

.takeUntil(Stream.fromFuture(stream.drain()))

Was this page helpful?
0 / 5 - 0 ratings