recordMissingKey function

String recordMissingKey(
  1. Object? key
)

Function recordMissingKey simply records the given key as a missing translation with unknown locale. It returns the same key provided, unaffected.


This function is visible only from the i18_exception_core package. The i18_exception package uses a different function with the same name.

Implementation

String recordMissingKey(Object? key) {
  if (Translations.recordMissingKeys)
    Translations.missingKeys.add(TranslatedString(locale: "", key: key));

  Translations.missingKeyCallback(key, "");

  return key.toString();
}