TranslationResult class

The result of a translation request.

Constructors

TranslationResult({required String text, required List<Translation> translations, DetectedLanguage? detectedLanguage})
const
TranslationResult.fromJson(Map<String, dynamic> json)
factory

Properties

detectedLanguage DetectedLanguage?
The detected language of the original text, for cases where it wasn't explicitly specified.
final
hashCode int
The hash code for this object.
no setterinherited
map Map<String, String>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
The original text in the base language that was used to generate the request.
final
translations List<Translation>
One Translation for each language that was requested.
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) bool
The equality operator.
inherited
operator [](String to) String?