...
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 = pricing.calculatePrice(product, cost, margin) |
Code Block |
---|
final productproductUtils = libs.ProductLib.ProductUtils.getProduct(...)
final costcostUtils = libs.ProductLib.ProductUtils.getCost(...)
final marginmarginUtils = libs.PricingLib.PricingUtils.getMargin(...)
final listPrice = libs.PricingLib.PricingUtils.calculatePrice(product, cost, margin) |