Allow a `FutureOr` return in `scan` (dart-lang/stream_transform#64)
Closes dart-lang/stream_transform#62
Adds async support in `scan` instead of a new `asyncScan` since the
latter would be able to serve both use cases so it would not be clear
why both exist.
Technically this is breaking but it's such an extreme edge case that it
is very unlikely to come up in practice - and the breakage is detected
statically. Due to the way `FuturOr<Future>` interacts with inference
there are some cases where the generic types may need to be explicitly
written. This is an unlikely scenario where the transformer emitted a
stream of futures.
4 files changed
tree: 9aaea083d88e9af8e4c19f1cb41907ccccd59225
- pkgs/