ListExchangeRateX extension
This extension provides additional functionality for List<ExchangeRate>
.
- on
Methods
-
getExchangeRate(
{required Currency from, required Currency to}) → ExchangeRate? -
Returns the exchange rate which matches with
from
andto
currencies. If this does not exist in this list, it returnsnull
. -
getExchangeRateSameDay(
{required DateTime dateTime, required Currency from, required Currency to}) → ExchangeRate? -
Returns the exchange rate which matches with
from
andto
currencies and refers to the same day. If this does not exist in this list, it returnsnull
.