getWeightControl static method

String getWeightControl(
  1. double weight,
  2. int sex,
  3. double height, {
  4. int fractionDigits = 1,
})

体重控制量 @param: weight(kg) @param: sex(1: male; Others: Female) @param: height(cm) @result: (positive number: lose weight, negative number: gain weight), kg

Implementation

static String getWeightControl(
  double weight,
  int sex,
  double height, {
  int fractionDigits = 1,
}) {
  final standardWeight = getStandardWeightDouble(sex, height);
  return (weight - standardWeight).toStringAsFixed(fractionDigits);
}