diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 96820fb1..ae840303 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1089,6 +1089,7 @@ const Map localizedValues = { }, "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "}, "SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"}, + "ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"}, "Ports": {"en": "Ports", "ar": "المنافذ"}, "Way": {"en": "Way", "ar": "الطزيقة"}, diff --git a/lib/pages/medical/active_medications/ActiveMedicationsPage.dart b/lib/pages/medical/active_medications/ActiveMedicationsPage.dart index 5bc9618d..a6fc5fef 100644 --- a/lib/pages/medical/active_medications/ActiveMedicationsPage.dart +++ b/lib/pages/medical/active_medications/ActiveMedicationsPage.dart @@ -49,7 +49,8 @@ class ActiveMedicationsPage extends StatelessWidget { height: 5, ), Texts( - TranslationBase.of(context).expDate+' :' + + TranslationBase.of(context).expDate + + ' :' + DateUtil.getDayMonthYearDateFormatted(model .activePrescriptionReport[index].orderDate), ), @@ -57,21 +58,24 @@ class ActiveMedicationsPage extends StatelessWidget { height: 5, ), Texts( - TranslationBase.of(context).route+ ' :' + + TranslationBase.of(context).route + + ' :' + model.activePrescriptionReport[index].route, ), SizedBox( height: 5, ), Texts( - TranslationBase.of(context).frequency+ ' :' + + TranslationBase.of(context).frequency + + ' :' + model.activePrescriptionReport[index].frequency, ), SizedBox( height: 5, ), Texts( - TranslationBase.of(context).dailyQuantity + ' :${model.activePrescriptionReport[index].doseDailyQuantity}', + TranslationBase.of(context).dailyQuantity + + ' :${model.activePrescriptionReport[index].doseDailyQuantity}', ), ], ), @@ -86,16 +90,20 @@ class ActiveMedicationsPage extends StatelessWidget { color: Colors.red, size: 28, ), - SizedBox(height: 25,), + SizedBox( + height: 25, + ), InkWell( - onTap: (){ + onTap: () { Navigator.push( context, FadePage( page: ReminderPage( - frequency: model.activePrescriptionReport[index] + frequency: model + .activePrescriptionReport[index] .frequencyNumber, - days: model.activePrescriptionReport[index].days, + days: model + .activePrescriptionReport[index].days, itemDescription: model .activePrescriptionReport[index] .itemDescription, diff --git a/lib/uitl/utils.dart b/lib/uitl/utils.dart index 67e5c6b9..e081d5db 100644 --- a/lib/uitl/utils.dart +++ b/lib/uitl/utils.dart @@ -209,49 +209,44 @@ class Utils { bool isLogin, count}) { List 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, - ), - Positioned( - right: 0.0, - child: Badge( - toAnimate: false, - position: BadgePosition.topEnd(), - shape: BadgeShape.circle, - badgeColor: secondaryColor.withOpacity(1.0), - borderRadius: BorderRadius.circular(8), - badgeContent: Container( - padding: EdgeInsets.all(2.0), - child: Text(count.toString(), - style: - TextStyle(color: Colors.white, fontSize: 16.0)), - ), + isEnable: projectViewModel.havePrivilege(5)), + Positioned( + right: 0.0, + child: Badge( + toAnimate: false, + position: BadgePosition.topEnd(), + shape: BadgeShape.circle, + badgeColor: secondaryColor.withOpacity(1.0), + borderRadius: BorderRadius.circular(8), + badgeContent: Container( + padding: EdgeInsets.all(2.0), + child: Text(count.toString(), + style: TextStyle(color: Colors.white, fontSize: 16.0)), ), ), - ]) - : MedicalProfileItem( - title: TranslationBase.of(context).myAppointments, - imagePath: 'my_appointment_icon.png', - subTitle: TranslationBase.of(context).myAppointmentsList, - hasBadge: true, ), - )); - } + ]) + : MedicalProfileItem( + title: TranslationBase.of(context).myAppointments, + imagePath: 'my_appointment_icon.png', + subTitle: TranslationBase.of(context).myAppointmentsList, + hasBadge: true, + isEnable: projectViewModel.havePrivilege(5), + ), + )); + if (projectViewModel.havePrivilege(10)) { medical.add(InkWell( onTap: () => Navigator.push(context, FadePage(page: LabsHomePage())), @@ -263,106 +258,97 @@ 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, - ), - )); - } + medical.add(InkWell( + 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(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, - ), - )); - } + 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), + ), + )); - 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(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, - ), - )); - } + medical.add(InkWell( + 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, + ), + )); - if (projectViewModel.havePrivilege(6)) { - medical.add(InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: DoctorHomePage(), - ), - ); - }, - child: MedicalProfileItem( + 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())); @@ -374,137 +360,132 @@ 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, - ), - )); + 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: () { @@ -536,43 +517,46 @@ 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, - imageUrl: url, - placeholder: (context, url) => Container( - child: Center( - child: CircularProgressIndicator() - ) - ), - errorWidget: (context, url, error){ - return Icon(Icons.error, color: Colors.red, size: 50,); - } - ); + placeholderFadeInDuration: Duration(milliseconds: 250), + fit: fitting, + imageUrl: url, + placeholder: (context, url) => + Container(child: Center(child: CircularProgressIndicator())), + errorWidget: (context, url, error) { + return Icon( + Icons.error, + color: Colors.red, + size: 50, + ); + }); } } - - - -Widget applyShadow({ Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}){ +Widget applyShadow( + {Color color = Colors.grey, + double shadowOpacity = 0.5, + double spreadRadius = 2, + double blurRadius = 7, + Offset offset = const Offset(2, 2), + @required Widget child}) { return Container( decoration: BoxDecoration( boxShadow: [ @@ -588,7 +572,6 @@ Widget applyShadow({ Color color = Colors.grey, double shadowOpacity = 0.5, doub ); } - Future userData() async { var userData = AuthenticatedUser.fromJson( await AppSharedPreferences().getObject(MAIN_USER)); @@ -603,15 +586,15 @@ extension IndexedIterable on Iterable { } } -openAppStore({String androidPackageName, String iOSAppID}) async{ - if(Platform.isAndroid){ - assert(!(androidPackageName == null), "Should have valid value in androidPackageName parameter"); - if((await FlutterHmsGmsAvailability.isGmsAvailable)) +openAppStore({String androidPackageName, String iOSAppID}) async { + if (Platform.isAndroid) { + 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)) + if ((await FlutterHmsGmsAvailability.isHmsAvailable)) launch("appmarket://details?id=com.ejada.hmg"); - - }else if(Platform.isIOS){ + } else if (Platform.isIOS) { assert((iOSAppID == null), "Should have valid value in iOSAppID parameter"); launch("https://itunes.apple.com/kr/app/apple-store/$iOSAppID)"); } diff --git a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart index 09306441..7b49559c 100644 --- a/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart +++ b/lib/widgets/data_display/medical/LabResult/laboratory_result_widget.dart @@ -103,7 +103,7 @@ class _LaboratoryResultWidgetState extends State { color: Colors.white, ), Texts( - TranslationBase.of(context).sendCopy, + TranslationBase.of(context).sendEmail, color: Colors.white, ) ], diff --git a/lib/widgets/data_display/medical/medical_profile_item.dart b/lib/widgets/data_display/medical/medical_profile_item.dart index c7e47dd9..bbc92db1 100644 --- a/lib/widgets/data_display/medical/medical_profile_item.dart +++ b/lib/widgets/data_display/medical/medical_profile_item.dart @@ -8,16 +8,19 @@ import '../../../Constants.dart'; import '../text.dart'; class MedicalProfileItem extends StatelessWidget { - MedicalProfileItem( - {@required this.imagePath, - @required this.title, - @required this.subTitle, - hasBadge}); - final String imagePath; final String title; final String subTitle; final bool hasBadge = false; + bool isEnable; + + MedicalProfileItem({ + @required this.imagePath, + @required this.title, + @required this.subTitle, + hasBadge, + this.isEnable = true, + }); @override Widget build(BuildContext context) { @@ -26,27 +29,48 @@ class MedicalProfileItem extends StatelessWidget { height: MediaQuery.of(context).size.height * 0.14, margin: EdgeInsets.all(5), decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: Colors.white - ), - padding: EdgeInsets.all(10), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts(title, - fontSize: 1.5 * SizeConfig.textMultiplier, - color: secondaryColor, - fontWeight: FontWeight.bold), - Texts(subTitle,fontSize: 1.4 * SizeConfig.textMultiplier,), - Align( - alignment:projectViewModel.isArabic ? Alignment.bottomLeft : Alignment.bottomRight, - child: Image.asset( - "assets/images/medical/$imagePath", - height: SizeConfig.heightMultiplier * 5, - width: SizeConfig.heightMultiplier * 5, + borderRadius: BorderRadius.circular(10), color: Colors.white), + clipBehavior: Clip.antiAlias, + child: Stack( + children: [ + Padding( + padding: EdgeInsets.all(10), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(title, + fontSize: 1.5 * SizeConfig.textMultiplier, + color: secondaryColor, + fontWeight: FontWeight.bold), + Texts( + subTitle, + fontSize: 1.4 * SizeConfig.textMultiplier, + ), + Align( + alignment: projectViewModel.isArabic + ? Alignment.bottomLeft + : Alignment.bottomRight, + child: Image.asset( + "assets/images/medical/$imagePath", + height: SizeConfig.heightMultiplier * 5, + width: SizeConfig.heightMultiplier * 5, + ), + ) + ], ), - ) + ), + isEnable + ? Container() + : Container( + width: double.infinity, + height: double.infinity, + color: Colors.grey.withOpacity(0.7), + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) ], ), );