rtcRoom$onUserMessageSendResult$error method

FutureOr<void> rtcRoom$onUserMessageSendResult$error(
  1. dynamic rtcRoom,
  2. dynamic msgid,
  3. dynamic error
)
override

@detail callback @author hanchenchen.c @brief 向房间内单个用户发送文本或二进制消息后(P2P),消息发送方会收到该消息发送结果回调。 @param rtcRoom ByteRTCRoom 对象。 @param msgid 本条消息的 ID。 @param error 消息发送结果,详见 ByteRTCUserMessageSendResult{@link #ByteRTCUserMessageSendResult} @note - 你应调用 sendUserMessage:message:config:{@link #ByteRTCRTSRoom#sendUserMessage:message:config} 向房间内单个用户发送文本消息 - 你应调用 sendUserBinaryMessage:message:config:{@link #ByteRTCRTSRoom#sendUserBinaryMessage:message:config} 向房间内单个用户发送二进制消息

Implementation

FutureOr<void> rtcRoom$onUserMessageSendResult$error(
    dynamic rtcRoom, dynamic msgid, dynamic error) async {
  if ($instance == null || $instance is! IRTCRoomEventHandler) {
    return;
  }
  return ($instance as IRTCRoomEventHandler).onUserMessageSendResult?.call(
      int.tryParse(msgid.toString()) ?? 0,
      t_UserMessageSendResult.ios_to_code($p_i
          .ByteRTCUserMessageSendResult.values
          .firstWhere((t) => t.$value == error || t.name == error)));
}