translate function

Future<String> translate(
  1. String word,
  2. String apiKey,
  3. String accessToken
)

Implementation

Future<String> translate(String word, String apiKey, String accessToken) async {
  var translator = await getTransaltor(apiKey, accessToken);
  var transalted =
      await translator.translateTextSingular(word, 'en-US', sourceLang: 'ja');

  return transalted.text;
}