Index: lib/src/stream_channel_controller.dart |
diff --git a/lib/src/stream_channel_controller.dart b/lib/src/stream_channel_controller.dart |
index ad78323effb2e9402614553ca5c6da42a6f04ac3..45b2865ed3a495a74e50ae6c04963d1d599df87f 100644 |
--- a/lib/src/stream_channel_controller.dart |
+++ b/lib/src/stream_channel_controller.dart |
@@ -15,13 +15,13 @@ import '../stream_channel.dart'; |
/// |
/// ```dart |
/// StreamChannel isolateChannel(ReceivePort receivePort, SendPort sendPort) { |
-/// var controller = new StreamChannelController(); |
+/// var controller = new StreamChannelController(allowForeignErrors: false); |
/// |
/// // Pipe all events from the receive port into the local sink... |
/// receivePort.pipe(controller.local.sink); |
/// |
/// // ...and all events from the local stream into the send port. |
-/// controller.local.listen(sendPort.add, onDone: receivePort.close); |
+/// controller.local.stream.listen(sendPort.send, onDone: receivePort.close); |
/// |
/// // Then return the foreign controller for your users to use. |
/// return controller.foreign; |