|
|
|
|
@ -193,24 +193,19 @@ class Utils {
|
|
|
|
|
|
|
|
|
|
static List<Widget> myMedicalList({ProjectViewModel projectViewModel, BuildContext context, bool isLogin, count}) {
|
|
|
|
|
List<Widget> medical = List();
|
|
|
|
|
if (projectViewModel.havePrivilege(5)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: MyAppointments(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: isLogin
|
|
|
|
|
? Stack(children: [
|
|
|
|
|
MedicalProfileItem(
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(5)
|
|
|
|
|
? Navigator.push(context, FadePage(page: MyAppointments()))
|
|
|
|
|
: null,
|
|
|
|
|
child: isLogin
|
|
|
|
|
? Stack(children: [
|
|
|
|
|
MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myAppointments,
|
|
|
|
|
imagePath: 'my_appointment_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myAppointmentsList,
|
|
|
|
|
hasBadge: true,
|
|
|
|
|
),
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(5)),
|
|
|
|
|
Positioned(
|
|
|
|
|
right: 0.0,
|
|
|
|
|
child: Badge(
|
|
|
|
|
@ -230,10 +225,9 @@ class Utils {
|
|
|
|
|
title: TranslationBase.of(context).myAppointments,
|
|
|
|
|
imagePath: 'my_appointment_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myAppointmentsList,
|
|
|
|
|
hasBadge: true,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
hasBadge: true,isEnable: projectViewModel.havePrivilege(5),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
if (projectViewModel.havePrivilege(10)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: LabsHomePage())),
|
|
|
|
|
@ -245,104 +239,99 @@ class Utils {
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(7)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: RadiologyHomePage())),
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).radiology,
|
|
|
|
|
imagePath: 'radiology_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).radiologySubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(12)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: HomePrescriptionsPage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).medicines,
|
|
|
|
|
imagePath: 'prescription_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).medicinesSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
onTap: () =>projectViewModel.havePrivilege(7)
|
|
|
|
|
? Navigator.push(context, FadePage(page: RadiologyHomePage()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).radiology,
|
|
|
|
|
imagePath: 'radiology_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).radiologySubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(7),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(25)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: VitalSignDetailsScreen(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).vitalSigns,
|
|
|
|
|
imagePath: 'vital_signs.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).vitalSignsSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(12)
|
|
|
|
|
? Navigator.push(context, FadePage(page: HomePrescriptionsPage()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).medicines,
|
|
|
|
|
imagePath: 'prescription_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).medicinesSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(12),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(25)
|
|
|
|
|
? Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(page: VitalSignDetailsScreen()),
|
|
|
|
|
)
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).vitalSigns,
|
|
|
|
|
imagePath: 'vital_signs.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).vitalSignsSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(25),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(48)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: ActiveMedicationsPage())),
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myMedical,
|
|
|
|
|
imagePath: 'active_medications.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myMedicalSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(6)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: DoctorHomePage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
onTap: () =>projectViewModel.havePrivilege(48)
|
|
|
|
|
? Navigator.push(context, FadePage(page: ActiveMedicationsPage()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myMedical,
|
|
|
|
|
imagePath: 'active_medications.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myMedicalSubtitle,
|
|
|
|
|
isEnable: false,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(6)
|
|
|
|
|
? Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: DoctorHomePage(),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myDoctor,
|
|
|
|
|
imagePath: 'doctor_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myDoctorSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(6)),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(14)
|
|
|
|
|
? Navigator.push(context, FadePage(page: EyeMeasurementsPage()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).eye,
|
|
|
|
|
imagePath: 'eye_measurement_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).eyeSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(14),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(22)
|
|
|
|
|
? Navigator.push(context, FadePage(page: InsuranceCard()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).insurance,
|
|
|
|
|
imagePath: 'insurance_card_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).insuranceSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(22),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(14)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: EyeMeasurementsPage()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).eye,
|
|
|
|
|
imagePath: 'eye_measurement_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).eyeSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
if (projectViewModel.havePrivilege(22)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: InsuranceCard()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).insurance,
|
|
|
|
|
imagePath: 'insurance_card_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).insuranceSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: InsuranceUpdate()));
|
|
|
|
|
@ -354,137 +343,133 @@ class Utils {
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(18)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: InsuranceApproval()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).insuranceApproval,
|
|
|
|
|
imagePath: 'insurance_approvals_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).insuranceApprovalSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(18)
|
|
|
|
|
? Navigator.push(context, FadePage(page: InsuranceApproval()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).insuranceApproval,
|
|
|
|
|
imagePath: 'insurance_approvals_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).insuranceApprovalSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(18),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(23)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => Navigator.push(context, FadePage(page: AllergiesPage())),
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).allergies,
|
|
|
|
|
imagePath: 'my_allergies_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).allergiesSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(23)
|
|
|
|
|
? Navigator.push(context, FadePage(page: AllergiesPage()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).allergies,
|
|
|
|
|
imagePath: 'my_allergies_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).allergiesSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(23),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(26)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: MyVaccines()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myVaccines,
|
|
|
|
|
imagePath: 'my_vaccines_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myVaccinesSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
if (projectViewModel.havePrivilege(20))
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: HomeReportPage()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).medical,
|
|
|
|
|
imagePath: 'medical_reports_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).medicalSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(26)
|
|
|
|
|
? Navigator.push(context, FadePage(page: MyVaccines()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myVaccines,
|
|
|
|
|
imagePath: 'my_vaccines_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myVaccinesSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(26),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(19)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: MonthlyReportsPage()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).monthly,
|
|
|
|
|
imagePath: 'monthly_reports_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).monthlySubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(20)
|
|
|
|
|
? Navigator.push(context, FadePage(page: HomeReportPage()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).medical,
|
|
|
|
|
imagePath: 'medical_reports_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).medicalSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(20),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(16)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: PatientSickLeavePage()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).sick,
|
|
|
|
|
imagePath: 'sick_leaves_icons.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).sickSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(19)
|
|
|
|
|
? Navigator.push(context, FadePage(page: MonthlyReportsPage()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).monthly,
|
|
|
|
|
imagePath: 'monthly_reports_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).monthlySubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(19),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(47)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: MyBalancePage()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myBalance,
|
|
|
|
|
imagePath: 'check-in.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myBalanceSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(16)
|
|
|
|
|
? Navigator.push(context, FadePage(page: PatientSickLeavePage()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).sick,
|
|
|
|
|
imagePath: 'sick_leaves_icons.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).sickSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(16),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(61)) {
|
|
|
|
|
medical.add(MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).patientCall,
|
|
|
|
|
imagePath: 'medical_history_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).patientCallSubtitle,
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(47)
|
|
|
|
|
? Navigator.push(context, FadePage(page: MyBalancePage()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myBalance,
|
|
|
|
|
imagePath: 'check-in.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myBalanceSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(47),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(24)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: MyTrackers()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myTrackers,
|
|
|
|
|
imagePath: 'my_tracker_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myTrackersSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
if (projectViewModel.havePrivilege(30))
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: SmartWatchInstructions()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).smartWatches,
|
|
|
|
|
imagePath: 'smartwatch_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).smartWatchesSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
// TODO mosa check it
|
|
|
|
|
medical.add(MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).patientCall,
|
|
|
|
|
imagePath: 'medical_history_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).patientCallSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(61),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(28)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
Navigator.push(context, FadePage(page: AskDoctorHomPage()));
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(24)
|
|
|
|
|
? Navigator.push(context, FadePage(page: MyTrackers()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).myTrackers,
|
|
|
|
|
imagePath: 'my_tracker_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).myTrackersSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(24),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(30)
|
|
|
|
|
? Navigator.push(context, FadePage(page: SmartWatchInstructions()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).smartWatches,
|
|
|
|
|
imagePath: 'smartwatch_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).smartWatchesSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(30),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(28)
|
|
|
|
|
? Navigator.push(context, FadePage(page: AskDoctorHomPage()))
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).askYour,
|
|
|
|
|
imagePath: 'ask_doctor_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).askYourSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(28)),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(32) || true) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
@ -515,23 +500,23 @@ class Utils {
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (projectViewModel.havePrivilege(40)) {
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
launch('whatsapp://send?phone=18885521858&text=');
|
|
|
|
|
},
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).chatbot,
|
|
|
|
|
imagePath: 'insurance_approvals_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).chatbotSubtitle,
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
medical.add(InkWell(
|
|
|
|
|
onTap: () => projectViewModel.havePrivilege(40)
|
|
|
|
|
? launch('whatsapp://send?phone=18885521858&text=')
|
|
|
|
|
: null,
|
|
|
|
|
child: MedicalProfileItem(
|
|
|
|
|
title: TranslationBase.of(context).chatbot,
|
|
|
|
|
imagePath: 'insurance_approvals_icon.png',
|
|
|
|
|
subTitle: TranslationBase.of(context).chatbotSubtitle,
|
|
|
|
|
isEnable: projectViewModel.havePrivilege(40),
|
|
|
|
|
),
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
return medical;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Widget loadNetworkImage({@required String url, BoxFit fitting = BoxFit.cover}) {
|
|
|
|
|
static Widget loadNetworkImage(
|
|
|
|
|
{@required String url, BoxFit fitting = BoxFit.cover}) {
|
|
|
|
|
return CachedNetworkImage(
|
|
|
|
|
placeholderFadeInDuration: Duration(milliseconds: 250),
|
|
|
|
|
fit: fitting,
|
|
|
|
|
@ -584,7 +569,8 @@ extension IndexedIterable<E> on Iterable<E> {
|
|
|
|
|
|
|
|
|
|
openAppStore({String androidPackageName, String iOSAppID}) async {
|
|
|
|
|
if (Platform.isAndroid) {
|
|
|
|
|
assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter");
|
|
|
|
|
assert(!(androidPackageName == null),
|
|
|
|
|
"Should have valid value in androidPackageName parameter");
|
|
|
|
|
if ((await FlutterHmsGmsAvailability.isGmsAvailable)) launch("market://details?id=com.ejada.hmg");
|
|
|
|
|
if ((await FlutterHmsGmsAvailability.isHmsAvailable)) launch("appmarket://details?id=com.ejada.hmg");
|
|
|
|
|
} else if (Platform.isIOS) {
|
|
|
|
|
|