medical file hot fix

merge-requests/572/head
hussam al-habibeh 4 years ago
parent 45e9ee60a9
commit 0e836c67c8

@ -85,6 +85,14 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
itemBuilder: (BuildContext ctxt, int index) {
return InkWell(
onTap: () {
if (model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.length !=
0)
Navigator.push(
context,
MaterialPageRoute(
@ -144,21 +152,36 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
);
},
child: DoctorCard(
doctorName: model.medicalFileList[0]
.entityList[0].timelines[index].doctorName,
doctorName: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorName,
clinic: model.medicalFileList[0].entityList[0]
.timelines[index].clinicName,
branch: model.medicalFileList[0].entityList[0]
.timelines[index].projectName,
profileUrl: model.medicalFileList[0]
.entityList[0].timelines[index].doctorImage,
profileUrl: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.doctorImage,
appointmentDate:
DateUtils.getDateTimeFromServerFormat(
model.medicalFileList[0].entityList[0]
.timelines[index].date,
),
isPrescriptions: true,
),
isShowEye: model
.medicalFileList[0]
.entityList[0]
.timelines[index]
.timeLineEvents[0]
.consulations
.length !=
0
? true
: false),
);
})
: Center(

@ -21,6 +21,7 @@ class DoctorCard extends StatelessWidget {
final Function onTap;
final bool isPrescriptions;
final String clinic;
final bool isShowEye;
DoctorCard(
{this.doctorName,
@ -31,7 +32,8 @@ class DoctorCard extends StatelessWidget {
this.appointmentDate,
this.orderNo,
this.isPrescriptions = false,
this.clinic});
this.clinic,
this.isShowEye = true});
@override
Widget build(BuildContext context) {
@ -50,7 +52,7 @@ class DoctorCard extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(15.0),
child: InkWell(
onTap: onTap,
onTap: (isShowEye) ? onTap : null,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
@ -169,6 +171,7 @@ class DoctorCard extends StatelessWidget {
]),
),
),
if (isShowEye)
Icon(
EvaIcons.eye,
)

Loading…
Cancel
Save