totalAmount property

Money get totalAmount

Implementation

Money get totalAmount {
  if (items.isEmpty) {
    return Money.zero();
  }

  Money total = Money.zero(currency: items.first.unitPrice.currency);

  for (final item in items) {
    total += item.totalPrice;
  }

  return total;
}