trackPurchase method
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!');
}
}