logAddToCartEvent method

Future<void> logAddToCartEvent({
  1. required double price,
  2. String contentData = '',
  3. String contentId = '',
  4. String contentType = '',
  5. String currency = 'USD',
})

This event uses when the addition of an item to a shopping cart or basket.

Implementation

Future<void> logAddToCartEvent(
    {
      required double price,
      String contentData='',
      String contentId='',
      String contentType='',
      String currency='USD',
    }) {
    final data = <String, dynamic>{
        'price': price,
        'contentData': contentData,
        'contentId': contentId,
        'contentType': contentType,
        'currency': currency,
    };
  return _channel!.invokeMethod('logAddToCartEvent',data);
}