productSetPrice function

dynamic productSetPrice(
  1. String val,
  2. int level
)

Implementation

productSetPrice(String val, int level){
  double _price = double.parse(val);
  if (level < currentProduct.price.length)
    currentProduct.price[level].price = _price;
  else
    currentProduct.price.add(PriceData([], _price, 0, "hourly", ImageData()));
}