Index: pkg/scheduled_test/lib/src/utils.dart |
diff --git a/pkg/scheduled_test/lib/src/utils.dart b/pkg/scheduled_test/lib/src/utils.dart |
index 31abe958e1dc94c0b21b2356087c135756b7c26b..7323e7f183abaf114eeece7ce2a9ccfc3e0900d2 100644 |
--- a/pkg/scheduled_test/lib/src/utils.dart |
+++ b/pkg/scheduled_test/lib/src/utils.dart |
@@ -137,10 +137,10 @@ typedef void StreamCanceller(); |
/// the wrapped stream. Unlike [StreamSubscription], this canceller will send a |
/// "done" message to the wrapped stream. |
Pair<Stream, StreamCanceller> streamWithCanceller(Stream stream) { |
- var controller = new StreamController(sync: true); |
- var controllerStream = stream.isBroadcast ? |
- controller.stream.asBroadcastStream() : |
- controller.stream; |
+ var controller = |
+ stream.isBroadcast ? new StreamController.broadcast(sync: true) |
+ : new StreamController(sync: true); |
+ var controllerStream = controller.stream; |
var subscription = stream.listen((value) { |
if (!controller.isClosed) controller.add(value); |
}, onError: (error) { |