GoogleTranslator class

This library is a Dart implementation of Google Translate API

authors Gabriel N. Pacheco

Constructors

GoogleTranslator({String serverHost = defaultServerHost, ClientType clientType = ClientType.siteGT})
allow to set base URL since for countries the default URL doesn't work

Properties

clientType → ClientType
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serverHost String
final

Methods

getAltTranslation(String sourceText, {String from = autoLanguage, required String to}) Future<AlternativeTranslation>
getDefinition(String sourceText, {String from = autoLanguage, String to = autoLanguage}) Future<Definition>
getExamples(String sourceText, {String from = autoLanguage}) Future<Example>
getPronunciationUrl(String sourceText, {String from = autoLanguage, required String to}) Future<Uri>
getSynonyms(String sourceText, {String from = autoLanguage}) Future<Synonym>
getTranslation(String sourceText, {String from = autoLanguage, required String to}) Future<Translation>
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

Constants

alternativeServerHost → const String
autoLanguage → const String
defaultServerHost → const String