getBodySuggestion static method

String getBodySuggestion(
  1. double bmi
)

Returns a suggestion based on the BMI value

Implementation

static String getBodySuggestion(double bmi) {
  for (var key in _massIndexToSuggestion.keys) {
    if (bmi <= key) {
      return _massIndexToSuggestion[key]!;
    }
  }
  return 'You are dangerously obese. You should consult a doctor.';
}