getPrice method
- ProductEntity product
Retrieves the price of a product based on its discount status.
product: The product entity containing pricing information.
Returns the price of the product, considering the discount if applicable.
Implementation
num getPrice(ProductEntity product) => product.discount > 0
? product.defaultPriceRule.priceVat
: product.defaultPriceRule.priceVatWithoutDiscount;