MessagesViewController constructor
MessagesViewController({})
Implementation
MessagesViewController({
required this.profile,
this.pageSize = 30,
this.searchedMsg,
this.willSendHandler,
}) {
ChatUIKit.instance.addObserver(this);
conversationType = () {
if (profile.type == ChatUIKitProfileType.group) {
return ConversationType.GroupChat;
} else {
return ConversationType.Chat;
}
}();
userMap[profile.id] = profile;
if (ChatUIKitProvider.instance.currentUserProfile != null) {
// 这能保证每次修改自己的信息后看到的历史信息数据是正确的
userMap[ChatUIKit.instance.currentUserId!] =
ChatUIKitProvider.instance.currentUserProfile!;
}
}