add the image dialog

merge-requests/411/head
Mohammad Aljammal 5 years ago
parent 6cd04996ec
commit 16f285fa63

@ -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/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/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.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:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -74,11 +75,21 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
height: 55, height: 55,
width: 55, width: 55,
child: Padding( child: InkWell(
padding: const EdgeInsets.all(8.0), onTap: (){
child: Image.network( showDialog(
model.prescriptionReportList[index].imageSRCUrl, context: context,
fit: BoxFit.cover, 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, height: 55,
width: 55, width: 55,
child: Padding( child: InkWell(
padding: const EdgeInsets.all(8.0), onTap: (){
child: Image.network( showDialog(
model.prescriptionReportEnhList[index].imageSRCUrl, context: context,
fit: BoxFit.cover, 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 {
); );
} }
} }

@ -427,15 +427,15 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre
), ),
Row( Row(
children: <Widget>[ children: <Widget>[
Texts(
!isPrescriptions? 'Result Date: ': 'Prescriptions Date ',
color: Colors.grey[800],
fontSize: 14,
),
Expanded( Expanded(
child: Texts( 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 @override
Size get preferredSize => Size(double.maxFinite,270); Size get preferredSize => Size(double.maxFinite,280);
} }

@ -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,
),
)
],
);
}
}
Loading…
Cancel
Save