fl_mlkit_translate_text

谷歌mlkit翻译文Flutter 插件,支持Android和IOS。

Google mlkit translate text for flutter plugin , supports Android and IOS.


void func() {
  FlMlKitTranslateText translate = FlMlKitTranslateText();

  /// translation
  translate.translate('');

  /// Switching translation languages
  translate.switchLanguage(translateText.sourceLanguage, translateText.targetLanguage);

  /// Get downloaded models
  translate.getDownloadedModels();

  /// Downloaded model
  translate.downloadedModel(TranslateLanguage.english);

  /// Delete downloaded model
  translate.deleteDownloadedModel(TranslateLanguage.english);

  /// Whether downloaded model
  translate.isModelDownloaded(TranslateLanguage.english);

  /// Be sure to call this method when you no longer use translation
  translate.dispose();
}

translatemanager

Libraries

fl_mlkit_translate_text