onRoomMessageReceived method
@detail callback
@author hanchenchen.c
@brief > This callback will be deprecated since version 3.64. Use onRoomMessageReceived{@link #IRTCRoomEventHandler#onRoomMessageReceived-2} instead.
@brief Receive a callback for broadcast messages in the room.
This callback is received when other users in the room call sendRoomMessage{@link #RTSRoom#sendRoomMessage} to send a broadcast message.
@param uid User ID of the message sender.
@param message The content of the received message.
Implementation
FutureOr<void> onRoomMessageReceived(
dynamic msgid, dynamic uid, dynamic message) async {
if ($instance == null || $instance is! IRTCRoomEventHandler) {
return;
}
return ($instance as IRTCRoomEventHandler).onRoomMessageReceived?.call(
int.tryParse(msgid.toString()) ?? 0,
uid.toString(),
message.toString());
}