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 After sending a text or binary message (P2P) to a single user in the room, the message sender will receive a callback with the result of the message. @param rtcRoom ByteRTCRoom object. @param msgid The ID of this message. @param error Message result. See ByteRTCUserMessageSendResult{@link #ByteRTCUserMessageSendResult} @note - You should call sendUserMessage:message:config:{@link #ByteRTCRTSRoom#sendUserMessage:message:config} to send a text message to a single user in the room - You should call sendUserBinaryMessage:message:config:{@link #ByteRTCRTSRoom#sendUserBinaryMessage:message:config} to send a binary message to a single user in the room

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)));
}