sendText method
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}');
}