From 78f2ab5ae34edcd79993dd5fae649e45384311bf Mon Sep 17 00:00:00 2001 From: mosazaid Date: Thu, 22 Apr 2021 17:00:03 +0300 Subject: [PATCH] design fixes --- .../profile/patient-profile-header-new-design.dart | 13 +++++++++++++ ...atient-profile-header-new-design_in_patient.dart | 2 +- lib/widgets/shared/doctor_card.dart | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design.dart b/lib/widgets/patients/profile/patient-profile-header-new-design.dart index 17f3abe6..c0698f16 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design.dart @@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; +import 'package:url_launcher/url_launcher.dart'; class PatientProfileHeaderNewDesign extends StatelessWidget { final PatiantInformtion patient; @@ -73,6 +74,18 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { DoctorApp.female_1, color: Colors.pink, ), + Container( + margin: EdgeInsets.symmetric(horizontal: 4), + child: InkWell( + onTap: () { + launch("tel://" + patient.mobileNumber); + }, + child: Icon( + Icons.phone, + color: Colors.black87, + ), + ), + ), ]), ), Row(children: [ diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart b/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart index fe118973..74292c56 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design_in_patient.dart @@ -184,7 +184,7 @@ class PatientProfileHeaderNewDesignInPatient extends StatelessWidget { "${TranslationBase.of(context).numOfDays}: ", fontSize: 1.2 * SizeConfig.textMultiplier, ), - AppText("4 st", + AppText("${ DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.createdOn)).inDays + 1}", fontSize: 1.4 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700), ], diff --git a/lib/widgets/shared/doctor_card.dart b/lib/widgets/shared/doctor_card.dart index 20218179..2e2f650e 100644 --- a/lib/widgets/shared/doctor_card.dart +++ b/lib/widgets/shared/doctor_card.dart @@ -58,7 +58,7 @@ class DoctorCard extends StatelessWidget { children: [ Expanded( child: AppText( - doctorName, + doctorName ?? "", bold: true, )), Expanded(