ExchangeRate.fromMinorUnitsWithCurrency constructor
ExchangeRate.fromMinorUnitsWithCurrency(})
Create an exchange rate from an integer holding minor units
to the provided decimalDigits
.
The decimalDigits
is the number of decimalDigits of the passed
exchangeRateMinorUnits
.
toDecimalDigits is the number of digits to store in the toCurrency. If not supplied, the decimalDigits of the toCurrency's currency is used.
Implementation
ExchangeRate.fromMinorUnitsWithCurrency(int exchangeRateMinorUnits,
{required int decimalDigits,
required this.fromCurrency,
required this.toCurrency,
this.toDecimalDigits})
: exchangeRate =
Fixed.fromInt(exchangeRateMinorUnits, scale: decimalDigits);