init static method

Future<void> init({
  1. String? apiKey,
  2. String? apiUrl,
})

Initializes Tolgee apiKey is the Tolgee API key apiUrl is the Tolgee API URL If apiKey and apiUrl are not provided, Tolgee will be initialized in static mode. If apiKey and apiUrl are provided, Tolgee will be initialized in remote mode. In remote mode, translations will be fetched from Tolgee Cloud. In static mode, translations will be fetched from local files.

Implementation

static Future<void> init({
  String? apiKey,
  String? apiUrl,
}) async {
  apiKey != null && apiUrl != null
      ? await TolgeeTranslationsStrategy.initRemote(
          apiKey: apiKey,
          apiUrl: apiUrl,
        )
      : await TolgeeTranslationsStrategy.initStatic();
}