getTotalAmount method Null safety

dynamic getTotalAmount()

This method is called when we have to get the Total amount

Implementation

getTotalAmount() {
  double totalAmount = 0.0;
  _cartItemList.forEach((e) => totalAmount += e.subTotal);
  return totalAmount;
}