Skip to content
pubscout

google_cloud_translation

0.0.4, released 2 years ago by awaik.pro

Flutter API wrapper for the Google Cloud Translation REST API.

$ flutter pub add google_cloud_translation
Source repository

What it does

Provides a Dart wrapper around the Google Cloud Translation REST API to translate text between languages and detect source languages in Flutter apps. It communicates directly with Google Cloud services using an API key.

AI-written summary of version 0.0.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to translate text dynamically using Google Cloud Translation in your app.
  • You want to detect the source language of a given text.

Skip it when

  • You need local, offline translation without relying on network requests.
  • You are looking for traditional app localization files (ARB) management.

Strengths

  • Simple and straightforward API for translation and language detection.
  • Works across both Android and iOS platforms.

Weaknesses

  • Limited to simple translation and language detection features.
  • Requires a paid Google Cloud account and API key.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

Requires a Google Cloud Translation API key.

final Translation _translation = Translation(apiKey: 'YOUR_API_KEY');
final result = await _translation.translate(text: 'Hello', to: 'es');

Alternatives

Packages that do the same job and could replace google_cloud_translation.

Works with

Packages commonly used together with google_cloud_translation: ones it builds on, ones built on it, and its own family.