getTranslatedText static method

Future<String> getTranslatedText(
  1. String key
)

Get a translated string for a given key from the didomi_config.json file based on the currently selected language.

The keys and values considered come from different places in the didomi_config.json file such as { notice: ... }, { preferences: ... } and { texts: ... }, giving the latter the highest priority in case of duplicates.

Implementation

static Future<String> getTranslatedText(String key) async =>
    await _channel.invokeMethod("getTranslatedText", {"key": key});