mergeWith method

Stream<T> mergeWith(
  1. Stream<T> other
)

Implementation

Stream<T> mergeWith(Stream<T> other) async* {
  final controller = StreamController<T>();
  listen(
    controller.add,
    onDone: () {
      other.listen(controller.add, onDone: controller.close);
    },
  );
  yield* controller.stream;
}