incrementItemToCart method Null safety

dynamic incrementItemToCart(
  1. int index
)

This function is used to increment the item quantity into cart

Implementation

incrementItemToCart(int index) {
  _cartItemList[index].quantity = ++_cartItemList[index].quantity;
  _cartItemList[index].subTotal =
      (_cartItemList[index].quantity * _cartItemList[index].unitPrice)
          .roundToDouble();

  return CartResponseWrapper(true, _successMessage, _cartItemList);
}