Make medical aid details visimable is med aid is Yes
This commit is contained in:
@@ -32,6 +32,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
double? headingFontSize = 35.0;
|
||||
double? bodyFonstSize = 20.0;
|
||||
double textFieldWidth = 400.0;
|
||||
late String medAid;
|
||||
|
||||
Widget getPatientDetailsField() {
|
||||
return Wrap(
|
||||
@@ -100,9 +101,17 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
editable: false,
|
||||
required: false),
|
||||
));
|
||||
if (medAidCodeController.text == "Yes") {
|
||||
medAidDet.addAll(
|
||||
[
|
||||
bool req;
|
||||
if (medAid == "Yes") {
|
||||
req = true;
|
||||
} else {
|
||||
req = false;
|
||||
}
|
||||
medAidDet.addAll([
|
||||
Visibility(
|
||||
visible: req,
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
@@ -111,6 +120,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
editable: false,
|
||||
required: false),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
@@ -119,6 +129,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
editable: false,
|
||||
required: false),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
@@ -127,6 +138,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
editable: false,
|
||||
required: false),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
@@ -135,6 +147,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
editable: false,
|
||||
required: false),
|
||||
),
|
||||
const SizedBox(height: 10.0),
|
||||
SizedBox(
|
||||
width: textFieldWidth,
|
||||
child: MyTextField(
|
||||
@@ -144,8 +157,9 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
required: false),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
),
|
||||
),
|
||||
]);
|
||||
|
||||
return Wrap(
|
||||
spacing: 10,
|
||||
@@ -217,6 +231,7 @@ class _PatientDetailsState extends State<PatientDetails> {
|
||||
text: widget.selectedPatient.medical_aid_main_member);
|
||||
medAidCodeController.value =
|
||||
TextEditingValue(text: widget.selectedPatient.medical_aid_code);
|
||||
medAid = widget.selectedPatient.medical_aid;
|
||||
});
|
||||
super.initState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user