Translation class abstract
Translation returned from GoogleTranslator.translate, containing the translated text, original source text, target language, and source language.
Constructors
- Translation.from({required String text, required String source, required Language sourceLanguage, required Language targetLanguage})
-
Factory constructor to create a Translation instance.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → String
-
The original source text before translation.
final
- sourceLanguage → Language
-
The source language of the translation.
final
- targetLanguage → Language
-
The target language of the translation.
final
- text → String
-
The translated text.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator +(
Object other) → String - Concatenates this translation text with another object.
-
operator ==(
Object other) → bool -
The equality operator.
override