> For the complete documentation index, see [llms.txt](https://docs.antsomi.com/developers-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.antsomi.com/developers-guide/hybrid-apps/flutter/tracking-events/sample-e-commerce-events/remove-a-product-from-the-shopping-cart.md).

# Remove a Product from the Shopping Cart

When user removes a product from their shopping cart, indicating a change in their purchase decision.

{% tabs %}
{% tab title="Dart" %}

```dart
import 'package:antsomisdk/antsomi.dart'; // Contains Antsomi SDK APIs
import 'package:antsomisdk/cdp_event.dart'; // Contains the CDPEvent class

final event = CDPEvent(en: 'remove_cart_product');
List<Map<String, dynamic>> items = [];

// Build event data
// Replace with your object
final productDetail = value['product'] as Product;
  
items.add({
  'type': 'product',
  'id': productDetail.sku ?? '',
  'name': productDetail.name ?? '',
  'sku': productDetail.sku,
  'quantity': value['quantity'] as int,
});

// Include the Multiple-Objects (items) in the event data
event.items = items;

// Set the Customer Objects to the event data
event.setCustomerProps = {
  'customers': {    
    'name': user.name ?? '',
    'customer_id': MD5Hash().generateMd5(user.email ?? ''),
  }
};

// Include more Event Attributes (extra) in the event data
addToCartEvent.eventProps = {
  'event_source': 'remove_cart',
  'cart_subtotal': cartModel.getTotal() ?? 0.0,
  'cart_item_count': cartModel.totalCartQuantity
};

// Initialize AntsomiSDK object
antsomiSdk = Antsomi();

// Send the event data to CDP
antsomiSdk.track(event: event);
```

{% endtab %}
{% endtabs %}
