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,6 +75,15 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
height: 55, height: 55,
width: 55, width: 55,
child: InkWell(
onTap: (){
showDialog(
context: context,
child: ShowImageDialog(
imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl,
)
);
},
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Image.network( child: Image.network(
@ -82,6 +92,7 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
), ),
), ),
),
SizedBox(width: 10,), SizedBox(width: 10,),
Expanded(child: Column( Expanded(child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -141,6 +152,15 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
height: 55, height: 55,
width: 55, width: 55,
child: InkWell(
onTap: (){
showDialog(
context: context,
child: ShowImageDialog(
imageUrl: model.prescriptionReportEnhList[index].imageSRCUrl,
)
);
},
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Image.network( child: Image.network(
@ -150,6 +170,7 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
), ),
), ),
),
SizedBox(width: 10,), SizedBox(width: 10,),
Expanded(child: Column( Expanded(child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -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( Expanded(
child: Texts(
!isPrescriptions? 'Result Date: ': 'Prescriptions Date ', !isPrescriptions? 'Result Date: ': 'Prescriptions Date ',
color: Colors.grey[800], color: Colors.grey[800],
fontSize: 14, fontSize: 14,
), ),
Expanded(
child: Texts(
'${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}',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