coupon 0.0.1 copy "coupon: ^0.0.1" to clipboard
coupon: ^0.0.1 copied to clipboard

handel coupon discount for fixed or percentage value

Pub License: MIT

Features #

  • flexible to add your own coupon model
  • support fixed coupons
  • support percentage coupons
  • calculate the discount value
  • calculate total price after discount

Getting started #

Usage #

 final coupon = Coupon.percentage(discountPercentage: 30); // or use Coupon.fixed
 num discountValue = coupon.discountValueFor(200) ;  // 60
 num totalAfterDiscount = coupon.totalAfterDiscount(200); // 140;

TODO #

  • support max discount value
  • support Expire date for coupons

Buy Me A Coffee

5
likes
150
pub points
15%
popularity

Publisher

unverified uploader

handel coupon discount for fixed or percentage value

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on coupon