From 3fefcf60d7d304274af6fbfdbe93b3bf9d4d593f Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Sun, 13 Jun 2021 10:06:42 +0300 Subject: [PATCH] match the app header design --- lib/config/config.dart | 4 +- .../profile/patient-profile-app-bar.dart | 130 ++++++++---------- 2 files changed, 59 insertions(+), 75 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index eb946dea..4bbbd40e 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]"; const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_DATE = "[0-9/]"; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; -// const BASE_URL = 'https://hmgwebservices.com/'; -const BASE_URL = 'https://uat.hmgwebservices.com/'; +const BASE_URL = 'https://hmgwebservices.com/'; +// const BASE_URL = 'https://uat.hmgwebservices.com/'; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; diff --git a/lib/widgets/patients/profile/patient-profile-app-bar.dart b/lib/widgets/patients/profile/patient-profile-app-bar.dart index 750ee9d5..770137a2 100644 --- a/lib/widgets/patients/profile/patient-profile-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-app-bar.dart @@ -9,7 +9,6 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; 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:provider/provider.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -98,7 +97,7 @@ class PatientProfileAppBar extends StatelessWidget child: Row(children: [ IconButton( icon: Icon(Icons.arrow_back_ios), - color: Colors.black, //Colors.black, + color: Color(0xFF2B353E), //Colors.black, onPressed: () => Navigator.pop(context), ), Expanded( @@ -111,6 +110,7 @@ class PatientProfileAppBar extends StatelessWidget fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.bold, fontFamily: 'Poppins', + color: Color(0xFF2B353E), ), ), gender == 1 @@ -215,10 +215,10 @@ class PatientProfileAppBar extends StatelessWidget AppText( TranslationBase.of(context).appointmentDate + " : ", - fontSize: 14, - fontWeight: FontWeight.normal, + fontSize: 10, + color: Color(0xFF575757), + fontWeight: FontWeight.w600, fontFamily: 'Poppins', - color: Colors.black, ), patient.startTime != null ? Container( @@ -231,7 +231,7 @@ class PatientProfileAppBar extends StatelessWidget child: AppText( patient.startTime ?? "", color: Colors.white, - fontSize: 1.5 * SizeConfig.textMultiplier, + fontSize: 12, textAlign: TextAlign.center, fontWeight: FontWeight.bold, ), @@ -244,7 +244,7 @@ class PatientProfileAppBar extends StatelessWidget child: AppText( AppDateUtils.convertDateFormatImproved( patient.appointmentDate ?? ''), - fontSize: 1.5 * SizeConfig.textMultiplier, + fontSize: 12, fontWeight: FontWeight.bold, ), ), @@ -267,17 +267,23 @@ class PatientProfileAppBar extends StatelessWidget color: Colors.black), children: [ new TextSpan( - text: TranslationBase - .of(context) - .fileNumber, - style: TextStyle( - fontSize: 14, fontFamily: 'Poppins')), + text: TranslationBase + .of(context) + .fileNumber, + + style: TextStyle( + fontSize: 10, + fontFamily: 'Poppins', + color: Color(0xFF575757), + fontWeight: FontWeight.w600, + + ),), new TextSpan( text: patient.patientId.toString(), style: TextStyle( - fontWeight: FontWeight.w700, - fontFamily: 'Poppins', - fontSize: 14)), + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + fontSize: 12, color: Color(0xFF2E303A),)), ], ), ), @@ -316,8 +322,10 @@ class PatientProfileAppBar extends StatelessWidget ), children: [ new TextSpan( - text: TranslationBase.of(context).age+ " : ", - style: TextStyle(fontSize: 14)), + text: TranslationBase + .of(context) + .age + " : ", + style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),)), new TextSpan( text: "${AppDateUtils.getAgeByBirthday( @@ -327,7 +335,9 @@ class PatientProfileAppBar extends StatelessWidget : patient.dateofBirth ?? "", context, isServerFormat: !isFromLiveCare)}", style: TextStyle( - fontWeight: FontWeight.w700, fontSize: 14)), + fontWeight: FontWeight.w700, + fontSize: 12, + color: Color(0xFF2E303A),)), ], ), ), @@ -361,9 +371,7 @@ class PatientProfileAppBar extends StatelessWidget child: RichText( text: new TextSpan( style: new TextStyle( - fontSize: - 2.0 * SizeConfig.textMultiplier, - color: Colors.black, + fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757), fontFamily: 'Poppins', ), children: [ @@ -373,21 +381,22 @@ class PatientProfileAppBar extends StatelessWidget : TranslationBase.of(context) .admissionDate + " : ", - style: TextStyle(fontSize: 14)), + style: TextStyle(fontSize: 10)), new TextSpan( text: patient.admissionDate == null ? "" : "${AppDateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}", style: TextStyle( - fontWeight: FontWeight.w700, - fontSize: 15)), + fontWeight: FontWeight.w700, + fontSize: 12, + color: Color(0xFF2E303A),)), ]))), if (patient.admissionDate != null) Row( children: [ AppText( "${TranslationBase.of(context).numOfDays}: ", - fontSize: 15, + fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757) ), if(isDischargedPatient && patient.dischargeDate != null) @@ -399,8 +408,10 @@ class PatientProfileAppBar extends StatelessWidget .getDateTimeFromServerFormat( patient.admissionDate)) .inDays + 1}", - fontSize: 15, - fontWeight: FontWeight.w700) + fontWeight: FontWeight.w700, + fontSize: 12, + color: Color(0xFF2E303A), + ) else AppText( "${DateTime @@ -409,8 +420,9 @@ class PatientProfileAppBar extends StatelessWidget .getDateTimeFromServerFormat( patient.admissionDate)) .inDays + 1}", - fontSize: 15, - fontWeight: FontWeight.w700), + fontWeight: FontWeight.w700, + fontSize: 12, + color: Color(0xFF2E303A),), ], ), ], @@ -468,17 +480,17 @@ class PatientProfileAppBar extends StatelessWidget '${TranslationBase .of(context) .dr}$doctorName', - color: Colors.black, - fontWeight: FontWeight.w600, - fontSize: 9, + color: Color(0xFF2E303A), + fontWeight: FontWeight.w700, + fontSize: 12, ), if (orderNo != null && !isPrescriptions) Row( children: [ AppText('Order No: ', - color: Colors.grey[800], - fontSize: 12), + + fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),), AppText(orderNo ?? '', fontSize: 12) ], @@ -488,8 +500,7 @@ class PatientProfileAppBar extends StatelessWidget Row( children: [ AppText('Invoice: ', - color: Colors.grey[800], - fontSize: 12), + fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),), AppText(invoiceNO ?? "", fontSize: 12) ], @@ -498,8 +509,7 @@ class PatientProfileAppBar extends StatelessWidget Row( children: [ AppText('Branch: ', - color: Colors.grey[800], - fontSize: 12), + fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),), AppText(branch ?? '', fontSize: 12) ], @@ -509,8 +519,7 @@ class PatientProfileAppBar extends StatelessWidget Row( children: [ AppText('Clinic: ', - color: Colors.grey[800], - fontSize: 12), + fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),), AppText(clinic ?? '', fontSize: 12) ], @@ -520,8 +529,7 @@ class PatientProfileAppBar extends StatelessWidget Row( children: [ AppText('Episode: ', - color: Colors.grey[800], - fontSize: 12), + fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),), AppText(episode ?? '', fontSize: 12) ], @@ -531,23 +539,20 @@ class PatientProfileAppBar extends StatelessWidget Row( children: [ AppText('Visit Date: ', - color: Colors.grey[800], - fontSize: 12), + fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),), AppText(visitDate ?? '', fontSize: 12) ], ), if (!isMedicalFile) Row( + children: [ - Expanded( - child: AppText( - !isPrescriptions - ? 'Result Date: ' - : 'Prescriptions Date ', - color: Colors.grey[800], - fontSize: 12, - ), + AppText( + !isPrescriptions + ? 'Result Date:' + : 'Prescriptions Date ', + fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757), ), AppText( '${AppDateUtils @@ -573,27 +578,6 @@ class PatientProfileAppBar extends StatelessWidget ), ); } - - - - - isToday(date) { - DateTime tempDate = new DateFormat("yyyy-MM-dd").parse(date); - return DateFormat("yyyy-MM-dd").format(tempDate) == - DateFormat("yyyy-MM-dd").format(DateTime.now()); - } - - myBoxDecoration() { - return BoxDecoration( - border: Border( - top: BorderSide( - color: Colors.green, - width: 5, - ), - ), - borderRadius: BorderRadius.circular(10)); - } - @override Size get preferredSize => Size(double.maxFinite, height == 0