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(
    concerned: () => const LocalizationStrings.concerned(),
    default0: () => const LocalizationStrings.default0(),
    disbelief: () => const LocalizationStrings.disbelief(),
    eating: () => const LocalizationStrings.eating(),
    grimace: () => const LocalizationStrings.grimace(),
    sad: () => const LocalizationStrings.sad(),
    screamOpen: () => const LocalizationStrings.screamOpen(),
    serious: () => const LocalizationStrings.serious(),
    smile: () => const LocalizationStrings.smile(),
    tongue: () => const LocalizationStrings.tongue(),
    twinkle: () => const LocalizationStrings.twinkle(),
    vomit: () => const LocalizationStrings.vomit(),
  );

  return LocalizationStrings.applyLanguageCode(localization, languageCode);
}