maxzod / coupon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About


Languages

Language:Dart 100.0%