withValueEqualTo method

List<MoneyTransaction> withValueEqualTo({
  1. Currency? currency,
  2. List<ExchangeRate>? exchangeRates,
  3. bool normalized = false,
  4. required Money value,
})

Return a filtered list of all the transactions with a value = value.

Before filtering the transactions, this list is normalized to the currency or, when this is null, to the currency of the value. Also, the result is already sorted.

Implementation

List<MoneyTransaction> withValueEqualTo({
  Currency? currency,
  List<ExchangeRate>? exchangeRates,
  bool normalized = false,
  required Money value,
}) =>
    _valueFilter(
      comparison: (actual, target) => actual == target,
      currency: currency,
      exchangeRates: exchangeRates,
      normalized: normalized,
      value: value,
    );