OnDeviceTranslator class

A class that translates on device the given input text.

Constructors

OnDeviceTranslator({required TranslateLanguage sourceLanguage, required TranslateLanguage targetLanguage})
Constructor to create an instance of OnDeviceTranslator.

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
Instance id.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceLanguage TranslateLanguage
The source language of the input.
final
targetLanguage TranslateLanguage
The target language to translate the input into.
final

Methods

close() Future<void>
Closes the translator and releases its resources.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
translateText(String text) Future<String>
Translates the given text from the source language into the target language.

Operators

operator ==(Object other) bool
The equality operator.
inherited