set method

dynamic set({
  1. required String key,
  2. required String locale,
  3. required dynamic value,
})

Set translation text

It will replace the existing text if the key is already set.

Implementation

set({
  required String key,
  required String locale,
  required dynamic value,
}) {
  if (translationTexts[key] == null) {
    translationTexts[key] = {};
  }

  /// Case insensitive
  translationTexts[key]![locale] = value;
}