apiKey property

String get apiKey

Returns the Google Translate API key.

Throws an Exception if the API key has not been set.

Example:

final key = AutoTranslateConfig.apiKey;

Implementation

static String get apiKey {
  if (_apiKey == null) {
    throw Exception(
      "Google Translate API key not set. Call AutoTranslateConfig.setApiKey('YOUR_KEY') in main().",
    );
  }
  return _apiKey!;
}