sendRoomMessage method
@detail api
@author hanchenchen.c
@brief Sends text messages to all other users in the room.
@param message
The content of the text message sent.
Message does not exceed 64 KB.
@return The number of the message sent this time is incremented from 1.
@note
- Before sending an in-room text message, you must call joinRoom:userInfo:userVisibility:roomConfig:{@link #ByteRTCRoom#joinRoom:userInfo:userVisibility:roomConfig} to join the room.
- After calling this function, you will receive an rtcRoom:onRoomMessageSendResult:error:{@link #ByteRTCRoomDelegate#rtcRoom:onRoomMessageSendResult:error} callback to notify the sender of the success or failure of the message;
- If the text message is sent successfully, all remote users in the room will receive rtcRoom:onRoomMessageReceived:message:{@link #ByteRTCRoomDelegate#rtcRoom:onRoomMessageReceived:message} callback.
Implementation
FutureOr<NSInteger> sendRoomMessage(NSString message) async {
return await nativeCall('sendRoomMessage:', [message]);
}