ChatViewModel constructor

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

Implementation

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