TopicChatViewModel class
- Inheritance
-
- Object
- ChangeNotifier
- ChatViewModel
- TopicChatViewModel
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
-
conversationEntryFuture
→ Future<
NIMResult< ?int> > -
Future created when the chat page enters the conversation.
finalinherited
- conversationId → String
-
finalinherited
- conversationType → NIMConversationType
-
finalinherited
- currentAccountId → String?
-
no setterinherited
- 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
- historyReadPositionCount ↔ int?
-
getter/setter pairinherited
- historyReadPositionCountTruncated ↔ bool
-
getter/setter pairinherited
- historyReadPositionDisplayCount → String
-
no setterinherited
- historyReadPositionLoading → bool
-
no setterinherited
- historyReadPositionState → HistoryReadPositionState
-
no setterinherited
- historyReadPositionTracker → HistoryReadPositionTracker
-
页面生命周期内冻结的最早未读消息状态和数量。
finalinherited
- 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
- routePendingNewMessageKey → String
-
no setteroverride
- 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
- showHistoryReadPosition → bool
-
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
-
beginHistoryReadPositionLocation(
) → Future< NIMResult< NIMMessage> ?> -
开始查询最早未读消息,调用方负责完成实际滚动。
inherited
-
beginLoadedHistoryReadPositionLocation(
) → NIMMessage? -
Starts a location using the current page when it covers the unread edge.
inherited
-
checkAutoTranslateMessages(
[List< ChatMessage> ? messages]) → Future<void> -
inherited
-
clearFindAnchorDate(
) → void -
滚动完成后清除定位锚点,防止 build 循环触发滚动
inherited
-
clearRoutePendingNewMessages(
) → void -
inherited
-
collectMessage(
ChatMessage message) → void -
inherited
-
completeHistoryReadPositionLocation(
{required bool success}) → 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
-
ensureQuickCommentsLoaded(
Iterable< ChatMessage> messages) → Future<void> -
批量加载消息表情快捷回复,已加载和加载中的消息不会重复请求
inherited
-
evaluateHistoryReadPositionTop(
int createTime, {bool hasReachedHistoryStart = false}) → void -
在消息列表稳定后上报顶部真实消息,用于决定入口是否可见。
inherited
-
fetchMoreMessage(
NIMQueryDirection direction) → dynamic -
override
-
filterForwardMessage(
bool filter(NIMMessage)) → bool -
inherited
-
finishHistoryReadPositionLoading(
) → void -
Stops the progress indicator once the target is ready for scrolling.
inherited
-
forwardMessage(
NIMMessage message, String conversationId, {String? postScript}) → void -
inherited
-
forwardMessageOneByOne(
String conversationId, {String? postScript, bool exitMultiMode = true}) → void -
逐条转发
exitMultiMode是否退出多选模式postScript转发后的附言conversationId转发的目标会话idinherited -
forwardTranslatedText(
String text, String conversationId, {String? postScript}) → Future< void> -
inherited
-
getAIMessages(
) → List< NIMAIModelCallMessage?> ? -
获取AI消息的上下文
仅对数字人单聊
inherited
-
getAnchor(
NIMQueryDirection direction) → NIMMessage? -
inherited
-
getMessageByRefer(
NIMMessageRefer messageRefer) → Future< NIMResult< NIMMessage> > -
Resolves the full message represented by a message reference.
override
-
getMessageReactionState(
NIMMessage message) → MessageReactionState -
获取指定消息的表情快捷回复状态
inherited
-
getMessageTranslationState(
NIMMessage message) → MessageTranslationState? -
inherited
-
getVoiceToTextState(
NIMMessage message) → MessageVoiceToTextState? -
inherited
-
handleQuickCommentNotificationForTest(
NIMMessageQuickCommentNotification notification) → void -
inherited
-
handleSendMessageResult(
NIMResult< NIMSendMessageResult> result) → Future<void> -
inherited
-
hideMessageTranslation(
ChatMessage message) → Future< void> -
inherited
-
initBaseData(
{bool updateTitle = true}) → Future< void> -
inherited
-
initData(
{NIMMessage? anchorMessage}) → dynamic -
override
-
initUserState(
String accountId) → void -
初始化用户在线状态
inherited
-
isAIUser(
) → bool -
会话对象是否是数字人
inherited
-
isHistoryReadPositionTarget(
NIMMessage message) → bool -
inherited
-
isMessageTranslating(
NIMMessage message) → bool -
inherited
-
isSelectedMessage(
NIMMessage message) → bool -
是否是被选中的消息
inherited
-
isVoiceToTextConverting(
NIMMessage message) → bool -
inherited
-
loadHistoryReadPositionAnchor(
NIMMessage anchor) → Future< 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转发的目标会话iderrorToast转发失败的提示inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
prepareForAnchorLoading(
{NIMMessage? visibleThrough}) → void -
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
-
setChatRouteVisible(
bool visible) → void -
inherited
-
shouldHandleCurrentMessage(
NIMMessage message) → bool -
override
-
shouldHandleMessageRefer(
NIMMessageRefer? messageRefer) → bool -
override
-
srollToNewMessage(
{bool scrollToEnd = true}) → void -
inherited
-
toggleMessageReaction(
ChatMessage message, int index) → Future< NIMResult< void> > -
切换当前账号对消息的指定表情快捷回复
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
translateInputText(
String sourceText, String language) → void -
inherited
-
translateMessage(
ChatMessage message, {MessageTranslationSource source = MessageTranslationSource.manual}) → Future< void> -
inherited
-
updateContactInfo(
ContactInfo? info) → void -
更新对方的用户信息
inherited
-
updateP2PReceipt(
List< NIMP2PMessageReadReceipt> receipts) → void -
inherited
-
updateVoicePlayModel(
bool isVoiceFromSpeaker) → void -
更新语音消息的播放模式
inherited
-
voiceToTextMessage(
ChatMessage message) → Future< void> -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited