getIconForLanguage function

Widget getIconForLanguage(
  1. String langCode,
  2. [bool? foreground,
  3. double? radius]
)

Return Icon widget for langCode

Implementation

Widget getIconForLanguage(String langCode, [bool? foreground, double? radius]) {
  if (langCode == showOtherLocales) {
    return const SelectLocaleButton(
      updateIconOnChange: false,
    );
  }
  if (LocaleStore.languageToCountry[langCode] != null) {
    return LangIconWithToolTip(
      langCode: langCode,
      radius: radius,
    );
  } else {
    return CircleFlag(
      langCode,
      size: radius ?? 48,
    );
  }
}