TopicChatViewModel constructor

TopicChatViewModel(
  1. String conversationId, {
  2. required BotSubsessionTopicContext topicContext,
  3. void onTopicResolved(
    1. BotSubsessionTopicContext context
    )?,
  4. ChatUIConfig? chatUIConfig,
})

Implementation

TopicChatViewModel(
  String conversationId, {
  required this.topicContext,
  this.onTopicResolved,
  ChatUIConfig? chatUIConfig,
})  : _currentTopic = topicContext.topic,
      _isPlaceholder =
          topicContext.isPlaceholder || topicContext.topic == null,
      super(
        conversationId,
        NIMConversationType.p2p,
        chatUIConfig: chatUIConfig,
      ) {
  chatTitle = rootSessionTitle;
  topicTitle = _resolveTitle();
  mute = false;
  _bindTopicEvents();
}