ChatViewModel constructor

ChatViewModel(
  1. String conversationId,
  2. NIMConversationType conversationType, {
  3. bool showReadAck = true,
  4. NIMMessage? anchorMessage,
  5. int? findAnchorDate,
  6. ChatUIConfig? chatUIConfig,
})

Implementation

ChatViewModel(
  this.conversationId,
  this.conversationType, {
  this.showReadAck = true,
  NIMMessage? anchorMessage,
  this.findAnchorDate,
  this.chatUIConfig,
}) {
  _setNIMMessageListener();
  initData(anchorMessage: anchorMessage);
  //初始化语音播放器
  ChatAudioPlayer.instance.initAudioPlayer();
  showWarningTips = chatUIConfig?.warningWidgetBuilder != null;
}