WD: 0 count hmg or hmc will not be displayed

merge-update-with-lab-changes
taha.alam 9 months ago
parent 2e9f6bcb51
commit bbf18baade

@ -22,38 +22,48 @@ class ResultByFacility extends StatelessWidget {
Widget build(BuildContext context) {
return Column(
children: [
InkWell(
onTap: () {
if (patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmgSize ==
0) return;
onFacilitySelected(false);
},
child: HospitalTitle(
iconUrl: 'assets/images/svg/HMG.svg',
title: TranslationBase.of(context).hmgHospital,
isHMC: false,
itemCount:
"${patientDoctorAppointmentListHospital.registeredDoctorMap?[selectedRegion]?.hmgSize ?? 0}",
nearest: patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmgDistance),
Visibility(
visible: patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmgSize !=
0,
child: InkWell(
onTap: () {
if (patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmgSize ==
0) return;
onFacilitySelected(false);
},
child: HospitalTitle(
iconUrl: 'assets/images/svg/HMG.svg',
title: TranslationBase.of(context).hmgHospital,
isHMC: false,
itemCount:
"${patientDoctorAppointmentListHospital.registeredDoctorMap?[selectedRegion]?.hmgSize ?? 0}",
nearest: patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmgDistance),
),
),
SizedBox(height: 16,),
InkWell(
onTap: () {
if (patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmcSize ==
0) return;
onFacilitySelected(true);
},
child: HospitalTitle(
iconUrl: 'assets/images/svg/HMC.svg',
title: TranslationBase.of(context).hmcHospital,
isHMC: true,
itemCount:
"${patientDoctorAppointmentListHospital.registeredDoctorMap?[selectedRegion]?.hmcSize ?? 0}",
nearest: patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmcDistance),
Visibility(
visible: patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmcSize !=
0,
child: InkWell(
onTap: () {
if (patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmcSize ==
0) return;
onFacilitySelected(true);
},
child: HospitalTitle(
iconUrl: 'assets/images/svg/HMC.svg',
title: TranslationBase.of(context).hmcHospital,
isHMC: true,
itemCount:
"${patientDoctorAppointmentListHospital.registeredDoctorMap?[selectedRegion]?.hmcSize ?? 0}",
nearest: patientDoctorAppointmentListHospital
.registeredDoctorMap?[selectedRegion]?.hmcDistance),
),
)
]);
}

@ -100,40 +100,57 @@ class RegionTitle extends StatelessWidget {
),
Row(
children: [
SvgPicture.asset(
'assets/images/svg/HMG.svg',
width: 10,
height: 10,
Visibility(
visible: hmgCount != "0",
child: Row(
children: [
SvgPicture.asset(
'assets/images/svg/HMG.svg',
width: 10,
height: 10,
),
SizedBox(
width: 8,
),
Text(
"${TranslationBase.of(context).HospitalString(num.parse(hmgCount)).replaceAll("@", hmgCount)}",
style: TextStyle(
fontSize: 14,
color: Color(0xFFD02127),
fontWeight: FontWeight.w600),
),
SizedBox(
width: 8,
),
],
),
),
SizedBox(
width: 8,
Visibility(
visible: hmcCount != "0" && hmgCount != "0",
child: Text(" ,")),
Visibility(
visible: hmcCount != "0",
child: Row(
children: [
SvgPicture.asset(
'assets/images/svg/HMC.svg',
width: 10,
height: 10,
),
SizedBox(
width: 8,
),
Text(
"${TranslationBase.of(context).MedicalCenterString(num.parse(hmcCount)).replaceAll("@", hmcCount)}",
style: TextStyle(
fontSize: 14,
color: Color(0xFF40ACC9),
fontWeight: FontWeight.w600),
),
],
),
),
Text(
"${TranslationBase.of(context).HospitalString(num.parse(hmgCount)).replaceAll("@", hmgCount)} ,",
style: TextStyle(
fontSize: 14,
color: Color(0xFFD02127),
fontWeight: FontWeight.w600),
),
SizedBox(
width: 8,
),
SvgPicture.asset(
'assets/images/svg/HMC.svg',
width: 10,
height: 10,
),
SizedBox(
width: 8,
),
Text(
"${TranslationBase.of(context).MedicalCenterString(num.parse(hmcCount)).replaceAll("@", hmcCount)}",
style: TextStyle(
fontSize: 14,
color: Color(0xFF40ACC9),
fontWeight: FontWeight.w600),
),
],
],
),
],
),

Loading…
Cancel
Save