Refactor a callback to async/await (dart-lang/stream_transform#139)
Use a try/finally block over using `whenComplete`. This also allows
combining the async and sync error handling with a single `catch`
instead of using `catch` for sync errors and `catchError` for async
errors.
Switch the early return to the shorter case of immediately listening on
the first stream, and leaving the more complex logic (and more common
case) with one less level of nesting.
This does move the call to `outerSubscription.pause()` to come before
the all to `currentSubscription.cancel()`, but this ordering should not
be meaningful even though it can be observed.
Fix a TODO about using `Future.ignore()`.
1 file changed
tree: 53e7d536d85bef345c46096789474cb84f665520
- pkgs/