getProteinMass static method

String getProteinMass(
  1. double weight,
  2. double pp, {
  3. int fractionDigits = 1,
})

蛋白量 @param: weight(kg) @param: pp(蛋白率 protein rate) @result: (kg)

Implementation

static String getProteinMass(
  double weight,
  double pp, {
  int fractionDigits = 1,
}) {
  return (weight * pp / 100).toStringAsFixed(fractionDigits);
}