getLocalizedValue method

String getLocalizedValue(
  1. dynamic localizedName
)

Function to get message to use

Implementation

String getLocalizedValue(dynamic localizedName) {
  if (customValues != null &&
      customValues!.containsKey(currentLocale.languageCode) &&
      customValues![currentLocale.languageCode]!.containsKey(localizedName)) {
    return customValues![currentLocale.languageCode]![localizedName]!;
  }

  assert(localizedValues.containsKey(currentLocale.languageCode),
      'Location ${currentLocale.languageCode} is not configured');
  assert(
      localizedValues[currentLocale.languageCode]!.containsKey(localizedName),
      'Requested name "$localizedName" for locale "${currentLocale.languageCode}" is not configured');

  return localizedValues[currentLocale.languageCode]![localizedName]!;
}