CommerceEvent.withProduct constructor

CommerceEvent.withProduct({
  1. required ProductActionType? productActionType,
  2. required Product product,
})

Initializes an instance of a Commerce Event with an action and a product.

Implementation

CommerceEvent.withProduct(
    {required this.productActionType, required Product product})
    : promotionActionType = null {
  products.add(product);
}