greeting method

String greeting(
  1. String key
)

Retrieves the greeting string for the given key.

If the key is not found, the method returns the key itself.

Implementation

String greeting(String key) {
  try {
    if (localizeValue[locale.languageCode]![key] == null) {
      return key;
    }
    return localizeValue[locale.languageCode]![key]!;
  } on Exception {
    return key;
  }
}