diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index 0a26a708..fa665aff 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_head import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/dialogs/ShowImageDialog.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -74,11 +75,21 @@ class PrescriptionItemsPage extends StatelessWidget { ), height: 55, width: 55, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.network( - model.prescriptionReportList[index].imageSRCUrl, - fit: BoxFit.cover, + child: InkWell( + onTap: (){ + showDialog( + context: context, + child: ShowImageDialog( + imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl, + ) + ); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.network( + model.prescriptionReportList[index].imageSRCUrl, + fit: BoxFit.cover, + ), ), ), ), @@ -141,12 +152,22 @@ class PrescriptionItemsPage extends StatelessWidget { ), height: 55, width: 55, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.network( - model.prescriptionReportEnhList[index].imageSRCUrl, - fit: BoxFit.cover, + child: InkWell( + onTap: (){ + showDialog( + context: context, + child: ShowImageDialog( + imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl, + ) + ); + }, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Image.network( + model.prescriptionReportEnhList[index].imageSRCUrl, + fit: BoxFit.cover, + ), ), ), ), @@ -190,3 +211,6 @@ class PrescriptionItemsPage extends StatelessWidget { ); } } + + + diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart index 62f57956..f21b7c71 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart @@ -427,15 +427,15 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ), Row( children: [ - Texts( - !isPrescriptions? 'Result Date: ': 'Prescriptions Date ', - color: Colors.grey[800], - fontSize: 14, - ), Expanded( child: Texts( - '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',fontSize: 14, + !isPrescriptions? 'Result Date: ': 'Prescriptions Date ', + color: Colors.grey[800], + fontSize: 14, ), + ), + Texts( + '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',fontSize: 14, ) ], ) @@ -494,5 +494,5 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre } @override - Size get preferredSize => Size(double.maxFinite,270); + Size get preferredSize => Size(double.maxFinite,280); } diff --git a/lib/widgets/shared/dialogs/ShowImageDialog.dart b/lib/widgets/shared/dialogs/ShowImageDialog.dart new file mode 100644 index 00000000..302366b7 --- /dev/null +++ b/lib/widgets/shared/dialogs/ShowImageDialog.dart @@ -0,0 +1,26 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class ShowImageDialog extends StatelessWidget { + final String imageUrl; + + const ShowImageDialog({Key key, this.imageUrl}) : super(key: key); + @override + Widget build(BuildContext context) { + return SimpleDialog( + children: [ + Container( + width: 340, + height: 340, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12) + ), + child: Image.network( + imageUrl, + fit: BoxFit.fill, + ), + ) + ], + ); + } +} \ No newline at end of file