Coupon constructor
Coupon({
- Key? key,
- int? chosenCoupon,
- List<
CoupenItem> ? coupons, - List<
CoupenItem> ? disabledCoupons, - String enabledTitle = "可使用优惠券",
- String disabledTitle = "不可使用优惠券",
- String exchangeButtonText = "兑换",
- bool exchangeButtonDisabled = false,
- int exchangeMaxLength = 10,
- int? displayedCouponIndex,
- bool showCloseButton = true,
- String closeButtonText = "不使用优惠",
- String inputPlaceholder = "请输入优惠码",
- bool showExchangeBar = true,
- Image? emptyImage,
- dynamic onSelect(
- int val
- dynamic onExchange(
- 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,
});