TranslationTextParser class

Parser for text translation that handles emoji and @ mentions. This implementation mirrors iOS/Android TranslationTextParser logic.

Constructors

TranslationTextParser()

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

buildTranslatedDisplayText(String originalText, Map<String, String> translatedTextMap, List<String>? atUserNames) String
Build translated display text from original text and translation map. This handles emoji and @ reconstruction.
getAtUserNames(MessageInfo? messageInfo, {String allMembersText = 'All'}) Future<List<String>?>
Get @ user names from message's atUserList. Returns a list of user display names (without @ prefix) allMembersText - The localized text for "All" (e.g., "All", "所有人")
replacedStringWithArray(List<String> array, List<int> indexArray, Map<String, String>? replaceDict) String?
Reconstruct translated text by replacing text segments with translations.
splitTextByEmojiAndAtUsers(String text, {List<String>? atUserNames}) Map<String, dynamic>?
Parse text message and return components for translation.