rtcDataChannelStateForString function

RTCDataChannelState rtcDataChannelStateForString (
  1. String state
)

Implementation

RTCDataChannelState rtcDataChannelStateForString(String state) {
  switch (state) {
    case "connecting":
      return RTCDataChannelState.RTCDataChannelConnecting;
    case "open":
      return RTCDataChannelState.RTCDataChannelOpen;
    case "closing":
      return RTCDataChannelState.RTCDataChannelClosing;
    case "closed":
      return RTCDataChannelState.RTCDataChannelClosed;
  }
  return RTCDataChannelState.RTCDataChannelClosed;
}