toLabel method

  1. @override
String toLabel([
  1. String languageCode = 'en'
])
override

based on languageCode and LocalizationStrings returns the label

Implementation

@override
String toLabel([String languageCode = 'en']) {
  final localization = when(
    bat: () => const LocalizationStrings.bat(),
    bear: () => const LocalizationStrings.bear(),
    cumbia: () => const LocalizationStrings.cumbia(),
    deer: () => const LocalizationStrings.deer(),
    diamond: () => const LocalizationStrings.diamond(),
    hola: () => const LocalizationStrings.hola(),
    pizza: () => const LocalizationStrings.pizza(),
    resist: () => const LocalizationStrings.resist(),
    selena: () => const LocalizationStrings.selena(),
    skull: () => const LocalizationStrings.skull(),
    skullOutline: () => const LocalizationStrings.skullOutline(),
  );

  return LocalizationStrings.applyLanguageCode(localization, languageCode);
}