logPurchase method

Future<void> logPurchase({
  1. required double amount,
  2. required String currency,
  3. Map<String, dynamic>? body,
})

Logs a purchase event with Facebook explicitly, in the specified amount and with the specified currency.

Implementation

Future<void> logPurchase({
  required double amount,
  required String currency,
  Map<String, dynamic>? body,
}) {
  final data = <String, dynamic>{
    'amount': amount,
    'currency': currency,
    'parameters': body ?? {},
  };
  return _channel!.invokeMethod<void>('logPurchase', data);
}