WD: 0 count hmg or hmc will not be displayed

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

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

@ -100,40 +100,57 @@ class RegionTitle extends StatelessWidget {
), ),
Row( Row(
children: [ children: [
SvgPicture.asset( Visibility(
'assets/images/svg/HMG.svg', visible: hmgCount != "0",
width: 10, child: Row(
height: 10, 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( Visibility(
width: 8, 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