trackPurchase method

Future<void> trackPurchase(
  1. String orderId,
  2. List<CartItem> items
)

Implementation

Future<void> trackPurchase(String orderId, List<CartItem> items) async {
  if (items.isNotEmpty) {
    return _channel.invokeMethod('predict.trackPurchase',
        {"orderId": orderId, 'items': _cartItemListMapper.map(items)});
  } else {
    throw PlatformException(
        code: '42', message: 'Items list should not be empty!');
  }
}