deleteItemFromCart method Null safety

dynamic deleteItemFromCart(
  1. int index
)

Implementation

deleteItemFromCart(int index) {
  for (int i = _cartItemList[index].quantity; i > 0; i--) {
    decrementItemFromCart(index);
  }
  message = CartResponseWrapper(true, _successMessage, _cartItemList);
  return message;
}