translateText function

String translateText(
  1. ContactusGetTranslate key,
  2. ContactusTransalte? languageCode
)

Implementation

String translateText(
    ContactusGetTranslate key, ContactusTransalte? languageCode) {
  Map<String, String> translationsMap = getContactUsMap(languageCode);
  String keyString = key.toString().split('.').last;
  return translationsMap[keyString] ?? '';
}