match the app header design

merge-requests/737/head
Elham Rababah 5 years ago
parent 132565c298
commit 3fefcf60d7

@ -5,8 +5,8 @@ const ONLY_NUMBERS = "[0-9]";
const ONLY_LETTERS = "[a-zA-Z &'\"]"; const ONLY_LETTERS = "[a-zA-Z &'\"]";
const ONLY_DATE = "[0-9/]"; const ONLY_DATE = "[0-9/]";
const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/'; const BASE_URL_LIVE_CARE = 'https://livecare.hmg.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh"; const PHARMACY_ITEMS_URL = "Services/Lists.svc/REST/GetPharmcyItems_Region_enh";
const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList"; const PHARMACY_LIST_URL = "Services/Patients.svc/REST/GetPharmcyList";
const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient"; const PATIENT_PROGRESS_NOTE_URL = "Services/DoctorApplication.svc/REST/GetProgressNoteForInPatient";

@ -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:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -98,7 +97,7 @@ class PatientProfileAppBar extends StatelessWidget
child: Row(children: [ child: Row(children: [
IconButton( IconButton(
icon: Icon(Icons.arrow_back_ios), icon: Icon(Icons.arrow_back_ios),
color: Colors.black, //Colors.black, color: Color(0xFF2B353E), //Colors.black,
onPressed: () => Navigator.pop(context), onPressed: () => Navigator.pop(context),
), ),
Expanded( Expanded(
@ -111,6 +110,7 @@ class PatientProfileAppBar extends StatelessWidget
fontSize: SizeConfig.textMultiplier * 1.8, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
color: Color(0xFF2B353E),
), ),
), ),
gender == 1 gender == 1
@ -215,10 +215,10 @@ class PatientProfileAppBar extends StatelessWidget
AppText( AppText(
TranslationBase.of(context).appointmentDate + TranslationBase.of(context).appointmentDate +
" : ", " : ",
fontSize: 14, fontSize: 10,
fontWeight: FontWeight.normal, color: Color(0xFF575757),
fontWeight: FontWeight.w600,
fontFamily: 'Poppins', fontFamily: 'Poppins',
color: Colors.black,
), ),
patient.startTime != null patient.startTime != null
? Container( ? Container(
@ -231,7 +231,7 @@ class PatientProfileAppBar extends StatelessWidget
child: AppText( child: AppText(
patient.startTime ?? "", patient.startTime ?? "",
color: Colors.white, color: Colors.white,
fontSize: 1.5 * SizeConfig.textMultiplier, fontSize: 12,
textAlign: TextAlign.center, textAlign: TextAlign.center,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
@ -244,7 +244,7 @@ class PatientProfileAppBar extends StatelessWidget
child: AppText( child: AppText(
AppDateUtils.convertDateFormatImproved( AppDateUtils.convertDateFormatImproved(
patient.appointmentDate ?? ''), patient.appointmentDate ?? ''),
fontSize: 1.5 * SizeConfig.textMultiplier, fontSize: 12,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
@ -267,17 +267,23 @@ class PatientProfileAppBar extends StatelessWidget
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase text: TranslationBase
.of(context) .of(context)
.fileNumber, .fileNumber,
style: TextStyle(
fontSize: 14, fontFamily: 'Poppins')), style: TextStyle(
fontSize: 10,
fontFamily: 'Poppins',
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),),
new TextSpan( new TextSpan(
text: patient.patientId.toString(), text: patient.patientId.toString(),
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 14)), fontSize: 12, color: Color(0xFF2E303A),)),
], ],
), ),
), ),
@ -316,8 +322,10 @@ class PatientProfileAppBar extends StatelessWidget
), ),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).age+ " : ", text: TranslationBase
style: TextStyle(fontSize: 14)), .of(context)
.age + " : ",
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),)),
new TextSpan( new TextSpan(
text: text:
"${AppDateUtils.getAgeByBirthday( "${AppDateUtils.getAgeByBirthday(
@ -327,7 +335,9 @@ class PatientProfileAppBar extends StatelessWidget
: patient.dateofBirth ?? "", context, : patient.dateofBirth ?? "", context,
isServerFormat: !isFromLiveCare)}", isServerFormat: !isFromLiveCare)}",
style: TextStyle( 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( child: RichText(
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
fontSize: fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),
2.0 * SizeConfig.textMultiplier,
color: Colors.black,
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
children: <TextSpan>[ children: <TextSpan>[
@ -373,21 +381,22 @@ class PatientProfileAppBar extends StatelessWidget
: TranslationBase.of(context) : TranslationBase.of(context)
.admissionDate + .admissionDate +
" : ", " : ",
style: TextStyle(fontSize: 14)), style: TextStyle(fontSize: 10)),
new TextSpan( new TextSpan(
text: patient.admissionDate == null text: patient.admissionDate == null
? "" ? ""
: "${AppDateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}", : "${AppDateUtils.convertDateFromServerFormat(patient.admissionDate.toString(), 'yyyy-MM-dd')}",
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontSize: 15)), fontSize: 12,
color: Color(0xFF2E303A),)),
]))), ]))),
if (patient.admissionDate != null) if (patient.admissionDate != null)
Row( Row(
children: [ children: [
AppText( AppText(
"${TranslationBase.of(context).numOfDays}: ", "${TranslationBase.of(context).numOfDays}: ",
fontSize: 15, fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757)
), ),
if(isDischargedPatient && if(isDischargedPatient &&
patient.dischargeDate != null) patient.dischargeDate != null)
@ -399,8 +408,10 @@ class PatientProfileAppBar extends StatelessWidget
.getDateTimeFromServerFormat( .getDateTimeFromServerFormat(
patient.admissionDate)) patient.admissionDate))
.inDays + 1}", .inDays + 1}",
fontSize: 15, fontWeight: FontWeight.w700,
fontWeight: FontWeight.w700) fontSize: 12,
color: Color(0xFF2E303A),
)
else else
AppText( AppText(
"${DateTime "${DateTime
@ -409,8 +420,9 @@ class PatientProfileAppBar extends StatelessWidget
.getDateTimeFromServerFormat( .getDateTimeFromServerFormat(
patient.admissionDate)) patient.admissionDate))
.inDays + 1}", .inDays + 1}",
fontSize: 15, fontWeight: FontWeight.w700,
fontWeight: FontWeight.w700), fontSize: 12,
color: Color(0xFF2E303A),),
], ],
), ),
], ],
@ -468,17 +480,17 @@ class PatientProfileAppBar extends StatelessWidget
'${TranslationBase '${TranslationBase
.of(context) .of(context)
.dr}$doctorName', .dr}$doctorName',
color: Colors.black, color: Color(0xFF2E303A),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w700,
fontSize: 9, fontSize: 12,
), ),
if (orderNo != null && if (orderNo != null &&
!isPrescriptions) !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
AppText('Order No: ', AppText('Order No: ',
color: Colors.grey[800],
fontSize: 12), fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
AppText(orderNo ?? '', AppText(orderNo ?? '',
fontSize: 12) fontSize: 12)
], ],
@ -488,8 +500,7 @@ class PatientProfileAppBar extends StatelessWidget
Row( Row(
children: <Widget>[ children: <Widget>[
AppText('Invoice: ', AppText('Invoice: ',
color: Colors.grey[800], fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
fontSize: 12),
AppText(invoiceNO ?? "", AppText(invoiceNO ?? "",
fontSize: 12) fontSize: 12)
], ],
@ -498,8 +509,7 @@ class PatientProfileAppBar extends StatelessWidget
Row( Row(
children: [ children: [
AppText('Branch: ', AppText('Branch: ',
color: Colors.grey[800], fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
fontSize: 12),
AppText(branch ?? '', AppText(branch ?? '',
fontSize: 12) fontSize: 12)
], ],
@ -509,8 +519,7 @@ class PatientProfileAppBar extends StatelessWidget
Row( Row(
children: [ children: [
AppText('Clinic: ', AppText('Clinic: ',
color: Colors.grey[800], fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
fontSize: 12),
AppText(clinic ?? '', AppText(clinic ?? '',
fontSize: 12) fontSize: 12)
], ],
@ -520,8 +529,7 @@ class PatientProfileAppBar extends StatelessWidget
Row( Row(
children: [ children: [
AppText('Episode: ', AppText('Episode: ',
color: Colors.grey[800], fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
fontSize: 12),
AppText(episode ?? '', AppText(episode ?? '',
fontSize: 12) fontSize: 12)
], ],
@ -531,23 +539,20 @@ class PatientProfileAppBar extends StatelessWidget
Row( Row(
children: [ children: [
AppText('Visit Date: ', AppText('Visit Date: ',
color: Colors.grey[800], fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),),
fontSize: 12),
AppText(visitDate ?? '', AppText(visitDate ?? '',
fontSize: 12) fontSize: 12)
], ],
), ),
if (!isMedicalFile) if (!isMedicalFile)
Row( Row(
children: <Widget>[ children: <Widget>[
Expanded( AppText(
child: AppText( !isPrescriptions
!isPrescriptions ? 'Result Date:'
? 'Result Date: ' : 'Prescriptions Date ',
: 'Prescriptions Date ', fontSize: 10, fontWeight: FontWeight.w600,color: Color(0xFF575757),
color: Colors.grey[800],
fontSize: 12,
),
), ),
AppText( AppText(
'${AppDateUtils '${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 @override
Size get preferredSize => Size get preferredSize =>
Size(double.maxFinite, height == 0 Size(double.maxFinite, height == 0

Loading…
Cancel
Save