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(
    blazerShirt: (_) => const LocalizationStrings.blazerShirt(),
    blazerSweater: (_) => const LocalizationStrings.blazerSweater(),
    collarSweater: (_) => const LocalizationStrings.collarSweater(),
    graphicShirt: (_) => const LocalizationStrings.graphicShirt(),
    hoodie: (_) => const LocalizationStrings.hoodie(),
    overall: (_) => const LocalizationStrings.overall(),
    shirtCrewNeck: (_) => const LocalizationStrings.shirtCrewNeck(),
    shirtScoopNeck: (_) => const LocalizationStrings.shirtScoopNeck(),
    shirtVNeck: (_) => const LocalizationStrings.shirtVNeck(),
  );

  return LocalizationStrings.applyLanguageCode(localization, languageCode);
}