ExchangeRate.fromFixedWithCurrency constructor

ExchangeRate.fromFixedWithCurrency(
  1. Fixed exchangeRate, {
  2. required Currency fromCurrency,
  3. required Currency toCurrency,
  4. int? toDecimalDigits,
})

Create an exchange rate from a Fixed decimal.

If supplied the toDecimalDigits sets the decimalDigits of the resulting Money amount. If not supplied then the toCurrency's decimalDigits is used.

Implementation

ExchangeRate.fromFixedWithCurrency(this.exchangeRate,
    {required this.fromCurrency,
    required this.toCurrency,
    this.toDecimalDigits});