closingContactLastBalance method
Implementation
num closingContactLastBalance(int herderId) {
if (isEmpty) {
return 0;
} else {
final filtered = where((element) => element.contactId == herderId)
.toList()
..sort((a, b) => a.closingRange.start.compareTo(b.closingRange.start));
if (filtered.isEmpty) {
return 0;
} else {
return filtered.last.balance;
}
}
}