CurrencyAmount.fromDecimal constructor

CurrencyAmount.fromDecimal(
  1. Decimal amount, {
  2. required Currency currency,
})

Implementation

CurrencyAmount.fromDecimal(Decimal amount, {required this.currency})
    : amount = amount.usingFractionDigits(currency.fractionDigitsInPricing);