spent method

Money spent({
  1. required Currency currency,
  2. List<ExchangeRate>? exchangeRates,
  3. DateTime? from,
  4. DateTime? until,
})

Returns the total of the expenses. These can be filtered with respect to from and until dates, or only one of these two dates, or none (in which case returns the total over the entire history of the transactions).

Implementation

Money spent({
  required Currency currency,
  List<ExchangeRate>? exchangeRates,
  DateTime? from,
  DateTime? until,
}) =>
    transactions.total(
      currency: currency,
      exchangeRates: exchangeRates,
      from: from,
      expenseOrIncome: ExpenseOrIncome.expense,
      until: until,
    );