goToChatAndClearStack function
void
goToChatAndClearStack(
- BuildContext context,
- String teamConversationId,
- NIMConversationType type
跳转到会话页面,并清空栈
Implementation
void goToChatAndClearStack(
BuildContext context, String teamConversationId, NIMConversationType type) {
if (IMKitRouter.instance.enableGoRouter) {
context.go(
RouterConstants.PATH_CHAT_PAGE,
extra: {
'conversationId': teamConversationId,
'conversationType': type,
},
);
} else {
Navigator.pushNamedAndRemoveUntil(context, RouterConstants.PATH_CHAT_PAGE,
ModalRoute.withName(RouterConstants.PATH_CHAT_PAGE),
arguments: {
'conversationId': teamConversationId,
'conversationType': type,
});
}
}