TranslateText class final
Translates a text to the given language; must not be used in secret chats. If the current user is a Telegram Premium user, then text formatting is preserved Returns FormattedText
- Inheritance
-
- Object
- TdFunction
- TranslateText
- Available extensions
- Annotations
-
- @immutable
Constructors
- TranslateText({FormattedText? text, required String toLanguageCode, required String tone})
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text → FormattedText?
-
text Text to translate
final
- toLanguageCode → String
-
toLanguageCode Language code of the language to which the message is
translated. Must be one of "af", "sq", "am", "ar", "hy", "az", "eu", "be",
"bn", "bs", "bg", "ca", "ceb", "zh-CN", "zh", "zh-Hans", "zh-TW",
"zh-Hant", "co", "hr", "cs", "da", "nl", "en", "eo", "et", "fi", "fr",
"fy", "gl", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "iw", "hi",
"hmn", "hu", "is", "ig", "id", "in", "ga", "it", "ja", "jv", "kn", "kk",
"km", "rw", "ko", "ku", "ky", "lo", "la", "lv", "lt", "lb", "mk", "mg",
"ms", "ml", "mt", "mi", "mr", "mn", "my", "ne", "no", "ny", "or", "ps",
"fa", "pl", "pt", "pt-BR", "pa", "ro", "ru", "sm", "gd", "sr", "st", "sn",
"sd", "si", "sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta",
"tt", "te", "th", "tr", "tk", "uk", "ur", "ug", "uz", "vi", "cy", "xh",
"yi", "ji", "yo", "zu"
final
- tone → String
-
tone Tone of the translation; must be one of "", "formal", "neutral",
"casual"; defaults to "neutral"
final
Methods
-
copyWith(
{FormattedText? text, String? toLanguageCode, String? tone}) → TranslateText -
Available on TranslateText, provided by the TranslateTextExtensions extension
-
getConstructor(
) → String -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- constructor → const String