sendText method

dynamic sendText(
  1. String text
)

Send text to remote peer. Call peer.connect() first to ensure data channel is ready.

Implementation

sendText(String text) {
  var message = RTCDataChannelMessage(text);
  _dataChannel!.send(message);
  _print('Sent text message of length ${text.length}');
}