navigateToChat method
dynamic
navigateToChat()
Implementation
navigateToChat() async {
final tryUseOnNavigateToChat = await TencentCloudChat.instance.dataInstance.contact.contactEventHandlers?.uiEventHandlers.onNavigateToChat?.call(userID: widget.friend.userID, groupID: null) ?? false;
if(!tryUseOnNavigateToChat){
if (TencentCloudChat.instance.dataInstance.basic.usedComponents.contains(TencentCloudChatComponentsEnum.message)) {
if(!isDesktop){
navigateToMessage(
context: context,
options: TencentCloudChatMessageOptions(
userID: widget.friend.userID,
groupID: "",
),
);
}else{
final conv = await TencentCloudChat.instance.chatSDKInstance.conversationSDK.getConversation(
userID: widget.friend.userID,
);
TencentCloudChat.instance.dataInstance.conversation.currentConversation = conv;
}
}
}
}