Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
final products = libs.ProductLib.ProductUtils
final pricing = libs.PricingLib.PricingUtils

final product = products.getProduct(...)
final cost = products.getCost(...)
final margin = pricing.getMargin(...)

final listPrice = pricing.calculatePrice(product, cost, margin)

Rather than

Warning

Don’t do this:

Code Block
final product = libs.ProductLib.ProductUtils.getProduct(...)
final cost = libs.ProductLib.ProductUtils.getCost(...)
final margin = libs.PricingLib.PricingUtils.getMargin(...)

final listPrice = libs.PricingLib.PricingUtils.calculatePrice(product, cost, margin)