Index: utils/pub/utils.dart |
diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart |
index 7e91b43801528ccd11ba72d2695f1b420b1efd0b..8617f2071bb24ef45801dbd702d3c21b4b967e1b 100644 |
--- a/utils/pub/utils.dart |
+++ b/utils/pub/utils.dart |
@@ -137,9 +137,9 @@ Future streamFirst(Stream stream) { |
/// Returns a wrapped version of [stream] along with a [StreamSubscription] that |
/// can be used to control the wrapped stream. |
Pair<Stream, StreamSubscription> streamWithSubscription(Stream stream) { |
- var controller = stream.isSingleSubscription ? |
- new StreamController() : |
- new StreamController.multiSubscription(); |
+ var controller = stream.isBroadcast ? |
+ new StreamController.broadcast() : |
+ new StreamController(); |
var subscription = stream.listen(controller.add, |
onError: controller.signalError, |
onDone: controller.close); |