sumBillDataPaidAmount function

double sumBillDataPaidAmount(
  1. List<BillData> items
)

Calculates the sum of the primary amounts of a list of BillData.

Implementation

double sumBillDataPaidAmount(List<BillData> items) => sumOf<BillData>(
      items.where((item) => item.isPaid).toList(),
      (item) => item.primaryAmount,
    );