Money.fromDecimalWithCurrency constructor

Money.fromDecimalWithCurrency(
  1. Decimal amount,
  2. Currency currency, {
  3. int? decimalDigits,
})

Implementation

factory Money.fromDecimalWithCurrency(Decimal amount, Currency currency,
        {int? decimalDigits}) =>
    Money._from(
        Fixed.fromDecimal(amount,
            scale: decimalDigits ?? currency.decimalDigits),
        currency);