lookupChatLocalizations function
Implementation
ChatLocalizations lookupChatLocalizations(Locale locale) {
// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'ar':
return ChatLocalizationsAr();
case 'de':
return ChatLocalizationsDe();
case 'en':
return ChatLocalizationsEn();
case 'es':
return ChatLocalizationsEs();
case 'fr':
return ChatLocalizationsFr();
case 'hi':
return ChatLocalizationsHi();
case 'id':
return ChatLocalizationsId();
case 'it':
return ChatLocalizationsIt();
case 'ja':
return ChatLocalizationsJa();
case 'ko':
return ChatLocalizationsKo();
case 'nl':
return ChatLocalizationsNl();
case 'pl':
return ChatLocalizationsPl();
case 'pt':
return ChatLocalizationsPt();
case 'tr':
return ChatLocalizationsTr();
case 'vi':
return ChatLocalizationsVi();
case 'zh':
return ChatLocalizationsZh();
}
throw FlutterError(
'ChatLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.',
);
}