logInitiateCheckoutEvent method

Future<void> logInitiateCheckoutEvent({
  1. required double totalPrice,
  2. String contentData = '',
  3. String contentId = '',
  4. String contentType = '',
  5. String currency = 'USD',
  6. int numItems = 1,
  7. bool paymentInfoAvailable = false,
})

The event for the checkout process. For example, clicking a Checkout button.

Implementation

Future<void> logInitiateCheckoutEvent(
    {
      required double totalPrice,
      String contentData='',
      String contentId='',
      String contentType='',
      String currency='USD',
      int numItems=1,
      bool paymentInfoAvailable=false
    }) {
    final data = <String, dynamic>{
      'numItems': numItems,
      'totalPrice': totalPrice,
      'contentData': contentData,
      'contentId': contentId,
      'contentType': contentType,
      'currency': currency,
      'paymentInfoAvailable': paymentInfoAvailable,
    };
  return _channel!.invokeMethod('logInitiateCheckoutEvent',data);
}