> 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/view-product.md).

# View Product

When a user opens a product page in your mobile app, indicating their interest in a specific item.

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

final event = CDPEvent(en: 'view_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,
  'price': double.tryParse(productDetail.salePrice ?? ''),
  'original_price': double.tryParse(productDetail.price ?? ''),
});

// Set the Multiple-Objects (items) to 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 ?? ''),
  }
};

// Initialize AntsomiSDK object
antsomiSdk = Antsomi();

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