...
Code Block |
---|
|
final rounderroundingUtils = libs.MathLuib.RoundingUtils
final someNumber = ...
rounderroundingUtils.round(someNumber, 2) |
This practice dramatically improves the readability of your code as it grows in size.
Code Block |
---|
final productsproductUtils = libs.ProductLib.ProductUtils
final pricingpricinUtils = libs.PricingLib.PricingUtils
final product = productsproductUtils.getProduct(...)
final cost = productsproductUtils.getCost(...)
final margin = pricingpricingUtils.getMargin(...)
final listPrice = pricingpricingUtils.calculatePrice(product, cost, margin) |
...
...
productUtils = libs.ProductLib.ProductUtils.getProduct(...)
final |
...
costUtils = libs.ProductLib.ProductUtils.getCost(...)
final |
...
marginUtils = libs.PricingLib.PricingUtils.getMargin(...)
final listPrice = libs.PricingLib.PricingUtils.calculatePrice(product, cost, margin) |