diff --git a/README.md b/README.md index 49b979fbc..b144272d2 100644 --- a/README.md +++ b/README.md @@ -137,8 +137,8 @@ await channel.detach(); Subscribing to channel messages ```dart -Stream messageStream = channel.subscribe(); -StreamSubscription channelMessageSubscription = messageStream.listen((ably.Message message){ +var messageStream = channel.subscribe(); +var channelMessageSubscription = messageStream.listen((ably.Message message){ print("New message arrived ${message.data}"); }); ```