getText static method

Future<Map<String, String>?> getText(
  1. String key
)

Get a dictionary/map for a given key in the form of { en: "Value in English", fr: "Value in French" } from the didomi_config.json file containing translations in different languages.

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<Map<String, String>?> getText(String key) async =>
    await _channel.invokeMapMethod("getText", {"key": key});