ChatViewModel constructor
ChatViewModel(
- String conversationId,
- NIMConversationType conversationType, {
- bool showReadAck = true,
- NIMMessage? anchorMessage,
- int? findAnchorDate,
- 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;
}