bmiDescription property
String
get
bmiDescription
Returns a description of BMI category based on calculated BMI value.
Implementation
String get bmiDescription {
return switch (bmi ?? 0) {
< 18.5 => 'Underweight', // BMI less than 18.5 indicates underweight.
>= 18.5 && < 25 =>
'Normal', // BMI between 18.5 and 24.9 indicates normal weight.
>= 25 && < 30 =>
'Overweight', // BMI between 25 and 29.9 indicates overweight.
_ => 'Obese', // BMI of 30 or greater indicates obesity.
};
}