TencentCloudChatUtils class
Properties
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
Static Methods
-
addDataToStringFiled({required String key, required String value, required String currentString})
→ dynamic
-
-
buildCallingText(V2TimMessage v2timMessage)
→ String
-
-
buildGroupChangeInfoText(V2TimGroupChangeInfo? info)
→ String
-
-
buildGroupMemberChangeInfoText(V2TimGroupMemberChangeInfo? info)
→ String
-
-
buildGroupTipsText(V2TimGroupTipsElem? tips)
→ String
-
-
checkString(String? text)
→ String?
-
This function checks if the given text is not null and not empty.
Returns the text if it's not null and not empty, otherwise returns null.
Example: checkString("Hello") returns "Hello".
-
checkStringWithoutSpace(String? text)
→ String?
-
This function checks if the given text is not null, not empty, and does not contain spaces.
Returns the text if it meets the conditions, otherwise returns null.
Example: checkStringWithoutSpace("Hello World") returns null.
-
compareString(String oldText, String newText)
→ ({String character, int index, bool isAddText})
-
-
debounce(String key, dynamic callback(), {Duration duration = const Duration(milliseconds: 500)})
→ void
-
Debounce function that delays the execution of the
callback
function
by the specified duration
.
-
deepEqual(Object? previous, Object? next)
→ bool
-
-
getDisplayNameByV2TimGroupMemberInfo(V2TimGroupMemberFullInfo? info)
→ String
-
-
getFileType(String file)
→ String
-
This function returns the MIME type based on the given file extension.
Example: getFileType("pdf") returns "application/pdf".
-
getImageExifInfoByBuffer({required Uint8List fileBuffer})
→ Future<ImageExifInfo?>
-
-
getMd5ByString(String data)
→ String
-
-
getMessageSenderName(V2TimMessage message)
→ String
-
-
getMessageSummary({V2TimMessage? message, int? messageReceiveOption, int? unreadCount, String? draftText, bool needStatus = true})
→ String
-
-
handleCustomMessage(V2TimMessage message)
→ (String, String?)
-
-
isCustomerServiceMessage(V2TimMessage message)
→ bool
-
-
isRobotMessage(V2TimMessage message)
→ bool
-
-
isVoteMessage(V2TimMessage message)
→ bool
-
-
launchLink({required String link})
→ void
-
-
parseMessageReply(String? jsonString)
→ ({String? messageAbstract, String? messageID, String? messageSender, int? messageSeq, int? messageTimestamp})
-
Parses the given
jsonString
to extract the messageSender, messageAbstract, and messageID.
-
throttle(String key, dynamic callback(), {Duration duration = const Duration(milliseconds: 500)})
→ void
-
Throttle function that ensures the
callback
function is not called
more often than the specified duration
.
-
v2TimGroupMemberInfo2V2TimGroupMemberFullInfo(V2TimGroupMemberInfo? info)
→ dynamic
-