coupon 0.0.1
coupon: ^0.0.1 copied to clipboard
handel coupon discount for fixed or percentage value
example/coupon_example.dart
import 'package:coupon/coupon.dart';
void main() {
final coupon =
Coupon.percentage(discountPercentage: 30); // or use Coupon.fixed
num discountValue = coupon.discountValueFor(200);
print(discountValue); // 60
num totalAfterDiscount = coupon.totalAfterDiscount(200);
print(totalAfterDiscount); // 140
}