AddPrice constructor

AddPrice(
  1. Currency currency
)

Implementation

factory AddPrice(off.Currency currency) {
  return switch (currency) {
    off.Currency.GBP => const AddPrice.britishPound(),
    off.Currency.USD => const AddPrice.dollar(),
    off.Currency.EUR => const AddPrice.euro(),
    off.Currency.RUB => const AddPrice.ruble(),
    off.Currency.INR => const AddPrice.rupee(),
    off.Currency.CHF => const AddPrice.swissFranc(),
    off.Currency.TRY => const AddPrice.turkishLira(),
    off.Currency.UAH => const AddPrice.ukrainianHryvnia(),
    off.Currency.KRW => const AddPrice.won(),
    off.Currency.JPY => const AddPrice.yen(),
    _ => const AddPrice.dollar(),
  };
}