switch (cardioVascularWidget.key) {
case 'respiratoryRate':
VitalComponent? respiratoryRate = widget
.cardiovascularFormModel?.cardiovascularAssessment?.respiratoryRate;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomInputTextFormField(
titleText: respiratoryRate?.title ?? "",
hintText: respiratoryRate?.hintText ?? "",
trailingInputUnitText: respiratoryRate?.suffixValue ?? "",
isTitleRequired: true,
isTitleMandatory: true,
onEnteredValue: (value) {
setState(() {
_respiratoryRate = value;
});
},
),
],
);
case 'issue':
Issue? issue =
widget.cardiovascularFormModel?.cardiovascularAssessment?.issue;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TitleMandatoryWidget(isMandatory: false, title: '${issue?.title}'),
Text('$_respiratoryRate'),
],
);
}
In the switch case, you can see there I have a case 'respiratoryRate' in which have CustomInputTextFormField it return value inside onValueChange then i apply a
setState(() { _respiratoryRate = value ; });
and other switch case is 'issue' is there, i want to rebuild issues case
Anyone please help me
0 comments:
Post a Comment
Thanks