CommerceEvent.withPromotion constructor

CommerceEvent.withPromotion({
  1. required PromotionActionType? promotionActionType,
  2. required Promotion promotion,
})

Initializes an instance of MPCommerceEvent with a promotion container

Implementation

CommerceEvent.withPromotion(
    {required this.promotionActionType, required Promotion promotion})
    : productActionType = null {
  promotions.add(promotion);
}