TopicChatViewModel class

Inheritance

Constructors

TopicChatViewModel(String conversationId, {required BotSubsessionTopicContext topicContext, void onTopicResolved(BotSubsessionTopicContext context)?, ChatUIConfig? chatUIConfig})

Properties

aiUserRequestSuccess int
getter/setter pairinherited
chatTitle String
getter/setter pairinherited
chatUIConfig ChatUIConfig?
getter/setter pairinherited
contactInfo ↔ ContactInfo?
getter/setter pairinherited
conversationId String
finalinherited
conversationType → NIMConversationType
finalinherited
currentRobot → V2NIMUserAIBot?
no setter
currentTopic → V2NIMTopic?
no setter
findAnchorDate int?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
hasMoreForwardMessages bool
getter/setter pairinherited
hasMoreNewerMessages bool
getter/setter pairinherited
initListener bool
getter/setter pairinherited
isLoading bool
getter/setter pairinherited
isMultiSelected bool
getter/setter pairinherited
isPlaceholder bool
no setter
isTyping bool
only for p2p
getter/setter pairinherited
markP2PMessageReadReceiptTime int
getter/setter pairinherited
messageList List<ChatMessage>
getter/setter pairinherited
mute bool
getter/setter pairinherited
newMessages List<ChatMessage>
getter/setter pairinherited
onTopicResolved → void Function(BotSubsessionTopicContext context)?
final
p2pUserAccId String?
no setterinherited
receiptTime int
getter/setter pairinherited
reeditMessage ↔ RevokedMessageInfo?
getter/setter pairinherited
replyMessage ↔ ChatMessage?
getter/setter pairinherited
revokeMessageId String?
getter/setter pairinherited
rootSessionTitle String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollToEnd ← void Function()
no getterinherited
selectedMessages List<NIMMessage>
no setterinherited
sessionId String
no setterinherited
showNewMessage bool
getter/setter pairinherited
showReadAck bool
getter/setter pairinherited
showWarningTips bool
getter/setter pairinherited
subscriptions List<StreamSubscription>
finalinherited
teamInfo ↔ NIMTeam?
getter/setter pairinherited
topicContext → BotSubsessionTopicContext
final
topicDeleted bool
no setter
topicTitle String
getter/setter pair
translationLanguageRequestId String?
getter/setter pairinherited
voiceFromSpeaker bool
getter/setter pairinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addMessagePin(NIMMessage message, {String? ext}) Future<NIMResult<void>>
inherited
addSelectedMessage(NIMMessage message) → void
添加选中的消息
inherited
clearFindAnchorDate() → void
滚动完成后清除定位锚点,防止 build 循环触发滚动
inherited
collectMessage(ChatMessage message) → void
inherited
deleteCurrentTopic() Future<NIMResult<void>>
deleteMessage(ChatMessage message) → void
delete message
inherited
deleteMessageOneByOne() → void
逐条删除
inherited
dispose() → void
Discards any resources used by the object.
override
fetchMoreMessage(NIMQueryDirection direction) → dynamic
override
filterForwardMessage(bool filter(NIMMessage)) bool
inherited
forwardMessage(NIMMessage message, String conversationId, {String? postScript}) → void
inherited
forwardMessageOneByOne(String conversationId, {String? postScript, bool exitMultiMode = true}) → void
逐条转发 exitMultiMode 是否退出多选模式 postScript 转发后的附言 conversationId 转发的目标会话id
inherited
getAIMessages() List<NIMAIModelCallMessage?>?
获取AI消息的上下文 仅对数字人单聊
inherited
getAnchor(NIMQueryDirection direction) → NIMMessage?
inherited
handleSendMessageResult(NIMResult<NIMSendMessageResult> result) Future<void>
inherited
initBaseData({bool updateTitle = true}) Future<void>
inherited
initData({NIMMessage? anchorMessage}) → dynamic
override
initUserState(String accountId) → void
初始化用户在线状态
inherited
isAIUser() bool
会话对象是否是数字人
inherited
isSelectedMessage(NIMMessage message) bool
是否是被选中的消息
inherited
loadMessageWithAnchor(NIMMessage anchor) → void
override
loadMessageWithAnchorDate(int date) → void
override
mergedMessageForward(String conversationId, {String? postScript, String? errorToast, bool exitMultiMode = true}) → void
合并转发 exitMultiMode 是否退出多选模式 postScript 转发后的附言 conversationId 转发的目标会话id errorToast 转发失败的提示
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeMessagePin(NIMMessage message, {String? ext}) → void
inherited
removeSelectedMessage(NIMMessage message) → void
移除选中的消息
inherited
removeSelectedMessages(List<NIMMessage> messages) → void
移除选中的消息
inherited
renameCurrentTopic(String title) Future<NIMResult<V2NIMTopic>>
resendMessage(ChatMessage message, {NIMMessage? replyMsg}) → void
inherited
resetTyping() → void
inherited
revokeMessage(ChatMessage message) Future<NIMResult<void>>
撤回消息
inherited
sendAudioMessage(String filePath, String? name, int duration, {NIMMessage? replyMsg}) → void
inherited
sendFileMessage(String filePath, String name, {NIMMessage? replyMsg, Uint8List? fileBytes}) → void
inherited
sendImageMessage(String filePath, String? name, int width, int height, {NIMMessage? replyMsg, String? imageType, Uint8List? fileBytes}) → void
inherited
sendInputNotification(bool isTyping) → void
inherited
sendLocationMessage(LocationInfo location) → void
inherited
sendMessage(NIMMessage message, {NIMMessage? replyMsg, NIMMessagePushConfig? pushConfig}) → void
发送消息最终实现 message 消息 replyMsg 回复消息 pushConfig 推送配置 aiAgent 消息发送的AI代理
override
sendMessageP2PReceipt(NIMMessage message) → void
inherited
sendTeamMessageReceipt(ChatMessage message) → void
inherited
sendTextMessage(String text, {NIMMessage? replyMsg, List<String>? pushList, AitContactsModel? aitContactsModel, String? title}) → void
inherited
sendVideoMessage(String videoPath, String? name, int duration, int width, int height, {NIMMessage? replyMsg, Uint8List? fileBytes}) → void
inherited
shouldHandleCurrentMessage(NIMMessage message) bool
override
shouldHandleMessageRefer(NIMMessageRefer? messageRefer) bool
override
srollToNewMessage({bool scrollToEnd = true}) → void
inherited
toString() String
A string representation of this object.
inherited
translateInputText(String sourceText, String language) → void
inherited
updateContactInfo(ContactInfo? info) → void
更新对方的用户信息
inherited
updateP2PReceipt(List<NIMP2PMessageReadReceipt> receipts) → void
inherited
updateVoicePlayModel(bool isVoiceFromSpeaker) → void
更新语音消息的播放模式
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited