createXXXMessage API (here, XXX indicates the message type) to create an original message object V2TIMMessage.createTargetedGroupMessage API (Details) to create a targeted message object V2TimMessage based on the original message object and specify the list of group members to receive the message.sendMessage API to send the targeted message.// Create a message firstV2TimValueCallback<V2TimMsgCreateInfoResult> target = await TencentImSDKPlugin.v2TIMManager.getMessageManager().createTextMessage(text: "");// Get the ID for sending a messageString id = target.data.id;// Create a targeted messageV2TimValueCallback<V2TimMsgCreateInfoResult> groupTarget = await TencentImSDKPlugin.v2TIMManager.getMessageManager().createTargetedGroupMessage(id: id, receiverList: ['user1','user2'],);// Send the messageTencentImSDKPlugin.v2TIMManager.getMessageManager().sendMessage(id: groupTarget.data.id, receiver: "", groupID: "groupID");
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback