Coupon constructor

Coupon({
  1. Key? key,
  2. int? chosenCoupon,
  3. List<CoupenItem>? coupons,
  4. List<CoupenItem>? disabledCoupons,
  5. String enabledTitle = "可使用优惠券",
  6. String disabledTitle = "不可使用优惠券",
  7. String exchangeButtonText = "兑换",
  8. bool exchangeButtonDisabled = false,
  9. int exchangeMaxLength = 10,
  10. int? displayedCouponIndex,
  11. bool showCloseButton = true,
  12. String closeButtonText = "不使用优惠",
  13. String inputPlaceholder = "请输入优惠码",
  14. bool showExchangeBar = true,
  15. Image? emptyImage,
  16. dynamic onSelect(
    1. int val
    )?,
  17. dynamic onExchange(
    1. String val
    )?,
})

Implementation

Coupon({
  Key? key,
  this.chosenCoupon,
  this.coupons,
  this.disabledCoupons,
  this.enabledTitle: "可使用优惠券",
  this.disabledTitle: "不可使用优惠券",
  this.exchangeButtonText: "兑换",
  this.exchangeButtonDisabled: false,
  this.exchangeMaxLength: 10,
  this.displayedCouponIndex,
  this.showCloseButton: true,
  this.closeButtonText: "不使用优惠",
  this.inputPlaceholder: "请输入优惠码",
  this.showExchangeBar: true,
  this.emptyImage,
  this.onSelect,
  this.onExchange,
});