sendCardMessage method
Implementation
Future<void> sendCardMessage(ChatUIKitProfile cardProfile) async {
Map<String, String> param = {cardUserIdKey: cardProfile.id};
if (cardProfile.contactShowName.isNotEmpty) {
param[cardNicknameKey] = cardProfile.contactShowName;
}
if (cardProfile.avatarUrl != null) {
param[cardAvatarKey] = cardProfile.avatarUrl!;
}
final message = Message.createCustomSendMessage(
targetId: profile.id,
chatType: chatType,
event: cardMessageKey,
params: param,
);
sendMessage(message);
}