sumBillDataPaidAmount function
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,
);