ChatMessageHelper class

Constructors

ChatMessageHelper()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

buildTextSpansWithPhoneAndUrlDetection(BuildContext context, bool isSelf, String text, int startIndex, {int? end, ChatUIConfig? chatUIConfig, dynamic remoteExtension}) List<InlineSpan>
解析包含电话号码和URL链接的文本消息
copyPhoneNumber(String phoneNumber) → void
getAIContentMsg(NIMMessage? message) String?
根据消息获取内容,作为数字人参数
getMessageBrief(NIMMessage message) String
getMultiLineMessageMap({String? title, String? content}) Map<String, dynamic>?
getReplayMessageText(BuildContext context, NIMMessageRefer messageRefer, String conversationId) Future<String>
getReplayMessageTextById(BuildContext context, String messageId, String conversationId) Future<String>
getSenderParams(NIMMessage message, String conversationId, {NIMMessagePushConfig? pushConfig}) Future<NIMSendMessageParams>
handleUrlClick(BuildContext context, String url) → void
imageSpan(String? tag) WidgetSpan?
处理文本消息中的表情
isOverlapping(TextMatch a, TextMatch b) bool
isReceivedMessageFromAi(NIMMessage message) bool
是否是数字人发送的消息
makePhoneCall(String phoneNumber) → void
removeOverlapping(List<TextMatch> matches) List<TextMatch>
showForwardMessageDialog(BuildContext context, ForwardMessageFunction forwardMessage, {List<String>? filterUser, required String sessionName, ForwardType type = ForwardType.normal}) → void
显示转发选择框
showForwardSelector(BuildContext context, ForwardMessageFunction forwardMessage, {List<String>? filterUser, required String sessionName, ForwardType type = ForwardType.normal}) → void
跳转转发选择器
showPhoneDialog(BuildContext context, String phoneNumber) → void
显示号码弹窗
textSpan(BuildContext context, bool isSelf, String text, int start, {int? end, ChatUIConfig? chatUIConfig, Map<String, dynamic>? remoteExtension}) List<TextSpan>
解析Text消息,将@消息和普通文本分开