calculateTotalPrice method

double calculateTotalPrice()

Calculates the total price of all items in the shopping cart.

Implementation

double calculateTotalPrice() {
  double total = 0;
  for (var i = 0; i < _cartBox.length; i++) {
    total += _cartBox.getAt(i)!.totalPrice;
  }
  return total;
}