Im using a websocket to make a chatbot. This is a broadcast Stream
WebSocketHelper(@Named('webSocketUrl') String url)
: channel = IOWebSocketChannel.connect(url) {
_broadcastStream = channel.stream.asBroadcastStream();
}
@override
Stream get stream => _broadcastStream;
//calling values from stream
if (_channel != null) {
subscription = _channel.stream.listen((message) {
debugPrint(message)
}, onError: (error) {
debugPrint("stream Error $error");
});
}
I’m getting response if is send hi,
the response is above as follows. so what i want i need is to collect all this individual words and form a sentence. how can i do that?
1