earned method

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

Returns the total of the incomes. 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 earned({
  required Currency currency,
  List<ExchangeRate>? exchangeRates,
  DateTime? from,
  DateTime? until,
}) =>
    transactions.total(
      currency: currency,
      exchangeRates: exchangeRates,
      from: from,
      expenseOrIncome: ExpenseOrIncome.income,
      until: until,
    );