onUserMessageReceived method

FutureOr<void> onUserMessageReceived(
  1. dynamic msgid,
  2. dynamic uid,
  3. dynamic message
)
override

@detail callback @author hanchenchen.c @brief > This callback will be deprecated since version 3.64. Use onUserMessageReceived{@link #IRTCRoomEventHandler#onUserMessageReceived-2} instead. @brief Receive this callback when you receive a peer-to-peer text message from another user in the room via sendUserMessage{@link #RTSRoom#sendUserMessage}. @param uid The user ID of the sender of the message. @param message The content of the received text message.

Implementation

FutureOr<void> onUserMessageReceived(
    dynamic msgid, dynamic uid, dynamic message) async {
  if ($instance == null || $instance is! IRTCRoomEventHandler) {
    return;
  }
  return ($instance as IRTCRoomEventHandler).onUserMessageReceived?.call(
      int.tryParse(msgid.toString()) ?? 0,
      uid.toString(),
      message.toString());
}