toLabel method
based on languageCode
and LocalizationStrings returns the label
Implementation
@override
String toLabel([String languageCode = 'en']) {
final localization = when(
noHair: (_) => const LocalizationStrings.noHair(),
eyepatch: (_) => const LocalizationStrings.eyepatch(),
hat: (_) => const LocalizationStrings.hat(),
hijab: (_) => const LocalizationStrings.hijab(),
turban: (_) => const LocalizationStrings.turban(),
winterHat1: (_) => const LocalizationStrings.winterHat1(),
winterHat2: (_) => const LocalizationStrings.winterHat2(),
winterHat3: (_) => const LocalizationStrings.winterHat3(),
winterHat4: (_) => const LocalizationStrings.winterHat4(),
longHairBigHair: (_) => const LocalizationStrings.longHairBigHair(),
longHairBob: (_) => const LocalizationStrings.longHairBob(),
longHairBun: (_) => const LocalizationStrings.longHairBun(),
longHairCurly: (_) => const LocalizationStrings.longHairCurly(),
longHairCurvy: (_) => const LocalizationStrings.longHairCurvy(),
longHairDreads: (_) => const LocalizationStrings.longHairDreads(),
longHairFrida: (_) => const LocalizationStrings.longHairFrida(),
longHairFro: (_) => const LocalizationStrings.longHairFro(),
longHairFroBand: (_) => const LocalizationStrings.longHairFroBand(),
longHairNotTooLong: (_) => const LocalizationStrings.longHairNotTooLong(),
longHairShavedSides: (_) =>
const LocalizationStrings.longHairShavedSides(),
longHairMiaWallace: (_) => const LocalizationStrings.longHairMiaWallace(),
longHairStraight: (_) => const LocalizationStrings.longHairStraight(),
longHairStraight2: (_) => const LocalizationStrings.longHairStraight2(),
longHairStraightStrand: (_) =>
const LocalizationStrings.longHairStraightStrand(),
shortHairDreads01: (_) => const LocalizationStrings.shortHairDreads01(),
shortHairDreads02: (_) => const LocalizationStrings.shortHairDreads02(),
shortHairFrizzle: (_) => const LocalizationStrings.shortHairFrizzle(),
shortHairShaggyMullet: (_) =>
const LocalizationStrings.shortHairShaggyMullet(),
shortHairShortCurly: (_) =>
const LocalizationStrings.shortHairShortCurly(),
shortHairShortFlat: (_) => const LocalizationStrings.shortHairShortFlat(),
shortHairShortRound: (_) =>
const LocalizationStrings.shortHairShortRound(),
shortHairShortWaved: (_) =>
const LocalizationStrings.shortHairShortWaved(),
shortHairSides: (_) => const LocalizationStrings.shortHairSides(),
shortHairTheCaesar: (_) => const LocalizationStrings.shortHairTheCaesar(),
shortHairTheCaesarSidePart: (_) =>
const LocalizationStrings.shortHairTheCaesarSidePart(),
);
return LocalizationStrings.applyLanguageCode(localization, languageCode);
}