sendEcommerceData static method

Future<void> sendEcommerceData(
  1. String name,
  2. double price, {
  3. String? category,
  4. int? quantity,
})

Send ecommerce data. name is the name of ecommerce data price is the value of ecommerce name

Implementation

static Future<void> sendEcommerceData(String name, double price,
    {String? category, int? quantity}) async {
  if(!Platform.isAndroid) return;
  var args = {};
  args['name'] = name;
  args['price'] = price;
  if (category != null) {
    args['category'] = category;
  }
  if (quantity != null) {
    args['quantity'] = quantity;
  }
  return await _channel.invokeMethod("Pushe.sendEcommerceData", args);
}