MismatchedCurrencyException constructor

MismatchedCurrencyException({
  1. required String expected,
  2. required String actual,
})

Thrown if an exchange is attempted with a Money has a Currency which doesn't match the exchange rate.

Implementation

MismatchedCurrencyException(
    {required String expected, required String actual}) {
  message = "The exchange rate 'fromCurrency' of $expected is not the "
      "same as the Money's currency $actual";
}