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(
    closed: () => const LocalizationStrings.eyesClosed(),
    cry: () => const LocalizationStrings.eyesCry(),
    default0: () => const LocalizationStrings.eyesDefault(),
    dizzy: () => const LocalizationStrings.eyesDizzy(),
    eyeRoll: () => const LocalizationStrings.eyesEyeRoll(),
    happy: () => const LocalizationStrings.eyesHappy(),
    hearts: () => const LocalizationStrings.eyesHearts(),
    side: () => const LocalizationStrings.eyesSide(),
    surprised: () => const LocalizationStrings.eyesSurprised(),
    wink: () => const LocalizationStrings.eyesWink(),
    winkWacky: () => const LocalizationStrings.eyesWinkWacky(),
    squint: () => const LocalizationStrings.eyesSquint(),
  );

  return LocalizationStrings.applyLanguageCode(localization, languageCode);
}