calculateSubTotal method

String calculateSubTotal(
  1. String price,
  2. int percentage,
  3. bool isMilesUsed
)

Implementation

String calculateSubTotal(String price, int percentage, bool isMilesUsed) {
  final totalPrice = double.tryParse(price) ?? 0;
  final subTotal =
      totalPrice - (neoMileUsedValue(totalPrice, percentage, isMilesUsed));
  return subTotal <= 0 ? '0.00' : subTotal.price;
}