getBodyStage static method
Returns the state of the BMI based on the BMI value Returns a string eg 'Underweight', 'Normal', 'Overweight', 'Moderately Obese', 'Severely Obese', 'Dangerously Obese'
Implementation
static String getBodyStage(double bmi) {
for (var key in _massIndexToState.keys) {
if (bmi <= key) {
return _massIndexToState[key]!;
}
}
return 'Dangerously Obese';
}