send method

  1. @override
Future<void> send(
  1. ChannelResponse response
)
override

Send a response to the channel.

Implementation

@override
Future<void> send(ChannelResponse response) async {
  _controller.add(ChannelEvent.message(
    id: 'echo-${DateTime.now().millisecondsSinceEpoch}',
    conversation: response.conversation,
    text: 'Echo: ${response.text ?? "[no text]"}',
  ));
}