whenOrNull<TResult extends Object?> method

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  1. TResult noHair(
    1. Color color
    )?,
  2. TResult eyepatch(
    1. Color color
    )?,
  3. TResult hat(
    1. Color color
    )?,
  4. TResult hijab(
    1. Color color
    )?,
  5. TResult turban(
    1. Color color
    )?,
  6. TResult winterHat1(
    1. Color color
    )?,
  7. TResult winterHat2(
    1. Color color
    )?,
  8. TResult winterHat3(
    1. Color color
    )?,
  9. TResult winterHat4(
    1. Color color
    )?,
  10. TResult longHairBigHair(
    1. Color color
    )?,
  11. TResult longHairBob(
    1. Color color
    )?,
  12. TResult longHairBun(
    1. Color color
    )?,
  13. TResult longHairCurly(
    1. Color color
    )?,
  14. TResult longHairCurvy(
    1. Color color
    )?,
  15. TResult longHairDreads(
    1. Color color
    )?,
  16. TResult longHairFrida(
    1. Color color
    )?,
  17. TResult longHairFro(
    1. Color color
    )?,
  18. TResult longHairFroBand(
    1. Color color
    )?,
  19. TResult longHairNotTooLong(
    1. Color color
    )?,
  20. TResult longHairShavedSides(
    1. Color color
    )?,
  21. TResult longHairMiaWallace(
    1. Color color
    )?,
  22. TResult longHairStraight(
    1. Color color
    )?,
  23. TResult longHairStraight2(
    1. Color color
    )?,
  24. TResult longHairStraightStrand(
    1. Color color
    )?,
  25. TResult shortHairDreads01(
    1. Color color
    )?,
  26. TResult shortHairDreads02(
    1. Color color
    )?,
  27. TResult shortHairFrizzle(
    1. Color color
    )?,
  28. TResult shortHairShaggyMullet(
    1. Color color
    )?,
  29. TResult shortHairShortCurly(
    1. Color color
    )?,
  30. TResult shortHairShortFlat(
    1. Color color
    )?,
  31. TResult shortHairShortRound(
    1. Color color
    )?,
  32. TResult shortHairShortWaved(
    1. Color color
    )?,
  33. TResult shortHairSides(
    1. Color color
    )?,
  34. TResult shortHairTheCaesar(
    1. Color color
    )?,
  35. TResult shortHairTheCaesarSidePart(
    1. Color color
    )?,
})
inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  TResult Function(@ColorSerialiser() Color color)? noHair,
  TResult Function(@ColorSerialiser() Color color)? eyepatch,
  TResult Function(@ColorSerialiser() Color color)? hat,
  TResult Function(@ColorSerialiser() Color color)? hijab,
  TResult Function(@ColorSerialiser() Color color)? turban,
  TResult Function(@ColorSerialiser() Color color)? winterHat1,
  TResult Function(@ColorSerialiser() Color color)? winterHat2,
  TResult Function(@ColorSerialiser() Color color)? winterHat3,
  TResult Function(@ColorSerialiser() Color color)? winterHat4,
  TResult Function(@ColorSerialiser() Color color)? longHairBigHair,
  TResult Function(@ColorSerialiser() Color color)? longHairBob,
  TResult Function(@ColorSerialiser() Color color)? longHairBun,
  TResult Function(@ColorSerialiser() Color color)? longHairCurly,
  TResult Function(@ColorSerialiser() Color color)? longHairCurvy,
  TResult Function(@ColorSerialiser() Color color)? longHairDreads,
  TResult Function(@ColorSerialiser() Color color)? longHairFrida,
  TResult Function(@ColorSerialiser() Color color)? longHairFro,
  TResult Function(@ColorSerialiser() Color color)? longHairFroBand,
  TResult Function(@ColorSerialiser() Color color)? longHairNotTooLong,
  TResult Function(@ColorSerialiser() Color color)? longHairShavedSides,
  TResult Function(@ColorSerialiser() Color color)? longHairMiaWallace,
  TResult Function(@ColorSerialiser() Color color)? longHairStraight,
  TResult Function(@ColorSerialiser() Color color)? longHairStraight2,
  TResult Function(@ColorSerialiser() Color color)? longHairStraightStrand,
  TResult Function(@ColorSerialiser() Color color)? shortHairDreads01,
  TResult Function(@ColorSerialiser() Color color)? shortHairDreads02,
  TResult Function(@ColorSerialiser() Color color)? shortHairFrizzle,
  TResult Function(@ColorSerialiser() Color color)? shortHairShaggyMullet,
  TResult Function(@ColorSerialiser() Color color)? shortHairShortCurly,
  TResult Function(@ColorSerialiser() Color color)? shortHairShortFlat,
  TResult Function(@ColorSerialiser() Color color)? shortHairShortRound,
  TResult Function(@ColorSerialiser() Color color)? shortHairShortWaved,
  TResult Function(@ColorSerialiser() Color color)? shortHairSides,
  TResult Function(@ColorSerialiser() Color color)? shortHairTheCaesar,
  TResult Function(@ColorSerialiser() Color color)?
      shortHairTheCaesarSidePart,
}) =>
    throw _privateConstructorUsedError;