From ecccb2d0682cfeadecac95c566bf3352130cbf6e Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Tue, 6 Apr 2021 15:29:20 +0300 Subject: [PATCH] fix font size --- lib/core/service/InsuranceCardService.dart | 14 +- lib/core/viewModel/InsuranceViewModel.dart | 4 +- .../insurance_approval_screen_patient.dart | 2 +- .../patients/insurance_approvals_details.dart | 2 +- .../radiology/radiology_details_page.dart | 125 ++++++++++-------- .../prescription/prescription_items_page.dart | 32 ++++- ...ent-profile-header-new-design-app-bar.dart | 9 +- ..._header_with_appointment_card_app_bar.dart | 2 +- 8 files changed, 113 insertions(+), 77 deletions(-) diff --git a/lib/core/service/InsuranceCardService.dart b/lib/core/service/InsuranceCardService.dart index 43c0e811..de7ee433 100644 --- a/lib/core/service/InsuranceCardService.dart +++ b/lib/core/service/InsuranceCardService.dart @@ -15,18 +15,18 @@ class InsuranceCardService extends BaseService { List get insuranceApproval => _insuranceApproval; - Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo}) async { + Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo , int projectId}) async { hasError = false; // _cardList.clear(); - if (appointmentNo != null) { - _insuranceApprovalModel.appointmentNo = appointmentNo; - _insuranceApprovalModel.eXuldAPPNO = null; - _insuranceApprovalModel.projectID = null; - } else { + // if (appointmentNo != null) { + // _insuranceApprovalModel.appointmentNo = appointmentNo; + // _insuranceApprovalModel.eXuldAPPNO = null; + // _insuranceApprovalModel.projectID = projectId; + // } else { _insuranceApprovalModel.appointmentNo = null; _insuranceApprovalModel.eXuldAPPNO = 0; _insuranceApprovalModel.projectID = 0; - } + // } await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS, patient: patient, diff --git a/lib/core/viewModel/InsuranceViewModel.dart b/lib/core/viewModel/InsuranceViewModel.dart index b08469ef..a0b51d20 100644 --- a/lib/core/viewModel/InsuranceViewModel.dart +++ b/lib/core/viewModel/InsuranceViewModel.dart @@ -14,12 +14,12 @@ class InsuranceViewModel extends BaseViewModel{ List get insuranceApproval => _insuranceCardService.insuranceApproval; - Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo}) async { + Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo, int projectId}) async { error = ""; setState(ViewState.Busy); if (appointmentNo != null) await _insuranceCardService.getInsuranceApproval(patient, - appointmentNo: appointmentNo); + appointmentNo: appointmentNo,projectId: projectId); else await _insuranceCardService.getInsuranceApproval(patient); if (_insuranceCardService.hasError) { diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index cb0be61c..3f0bfedf 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -42,7 +42,7 @@ class _InsuranceApprovalScreenNewState return BaseView( onModelReady: patient.appointmentNo != null ? (model) => model.getInsuranceApproval(patient, - appointmentNo: patient.appointmentNo) + appointmentNo: patient.appointmentNo,projectId: patient.projectId) : (model) => model.getInsuranceApproval(patient), builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold( diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index 98daef73..e83428fd 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -37,7 +37,7 @@ class _InsuranceApprovalsDetailsState extends State { return BaseView( onModelReady: patient.appointmentNo != null ? (model) => model.getInsuranceApproval(patient, - appointmentNo: patient.appointmentNo) + appointmentNo: patient.appointmentNo,projectId: patient.projectId) : (model) => model.getInsuranceApproval(patient), builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold( diff --git a/lib/screens/patients/profile/radiology/radiology_details_page.dart b/lib/screens/patients/profile/radiology/radiology_details_page.dart index 6b54dec7..d2b93eaf 100644 --- a/lib/screens/patients/profile/radiology/radiology_details_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_details_page.dart @@ -19,7 +19,13 @@ class RadiologyDetailsPage extends StatelessWidget { final PatiantInformtion patient; final String patientType; final String arrivalType; - RadiologyDetailsPage({Key key, this.finalRadiology, this.patient, this.patientType, this.arrivalType}); + + RadiologyDetailsPage( + {Key key, + this.finalRadiology, + this.patient, + this.patientType, + this.arrivalType}); @override Widget build(BuildContext context) { @@ -30,66 +36,73 @@ class RadiologyDetailsPage extends StatelessWidget { lineItem: finalRadiology.invoiceLineItemNo, invoiceNo: finalRadiology.invoiceNo), builder: (_, model, widget) => AppScaffold( - appBar: PatientProfileHeaderWhitAppointmentAppBar( - patient: patient, - patientType: patientType??"0", - arrivalType: arrivalType??"0", - orderNo: finalRadiology.orderNo.toString(), - appointmentDate:finalRadiology.orderDate, - doctorName: finalRadiology.doctorName, - profileUrl: finalRadiology.doctorImageURL, - invoiceNO: finalRadiology.invoiceNo.toString(), - ), - isShowAppBar: true, - baseViewModel: model, - body: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - margin: EdgeInsets.all(8), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox(height: 5,), - Texts(TranslationBase.of(context).generalResult), - SizedBox(height: 5,), - Padding( - padding: const EdgeInsets.all(8.0), - child: Texts( - '${finalRadiology.reportData.trim()}', - textAlign: TextAlign.start, - fontSize: 17, - color: Colors.grey, - ), + appBar: PatientProfileHeaderWhitAppointmentAppBar( + patient: patient, + patientType: patientType ?? "0", + arrivalType: arrivalType ?? "0", + orderNo: finalRadiology.orderNo.toString(), + appointmentDate: finalRadiology.orderDate, + doctorName: finalRadiology.doctorName, + profileUrl: finalRadiology.doctorImageURL, + invoiceNO: finalRadiology.invoiceNo.toString(), + ), + isShowAppBar: true, + baseViewModel: model, + body: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + margin: EdgeInsets.all(8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 5, + ), + Texts(TranslationBase.of(context).generalResult), + SizedBox( + height: 5, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + '${finalRadiology.reportData.trim()}', + textAlign: TextAlign.start, + fontSize: 17, + color: Colors.grey, ), - SizedBox(height: 25,), - if(model.radImageURL.isNotEmpty) - Center( - child: Container( - width: MediaQuery.of(context).size.width * 0.8, - child: Button( + ), + SizedBox( + height: 100, + ), - color: Colors.red, - onTap: () { - launch(model.radImageURL); - }, - title: TranslationBase.of(context).openRad, - ), - ), - ), - ], - ), + ], ), - ], - ), + ), + ], ), + ), + bottomSheet: model.radImageURL.isNotEmpty ?Container( + width: double.maxFinite, + height: 100, + child: Container( + margin: EdgeInsets.only(left: 35,right: 35,top: 12,bottom: 12), + child: Button( + color: Colors.red, + onTap: () { + launch(model.radImageURL); + }, + title: TranslationBase.of(context).openRad, + ), ), + ):null, + ), ); } } diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index fa665aff..4197b5b6 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -100,13 +100,25 @@ class PrescriptionItemsPage extends StatelessWidget { Row( children: [ Texts(TranslationBase.of(context).route,color: Colors.grey,), - Expanded(child: Texts(model.prescriptionReportList[index].routeN)), + Expanded(child: Texts(" "+model.prescriptionReportList[index].routeN)), ], ), Row( children: [ Texts(TranslationBase.of(context).frequency,color: Colors.grey,), - Texts(model.prescriptionReportList[index].frequencyN ?? ''), + Texts(" "+model.prescriptionReportList[index].frequencyN ?? ''), + ], + ), + Row( + children: [ + Texts(TranslationBase.of(context).dailyDoses,color: Colors.grey,), + Texts(" "+model.prescriptionReportList[index].doseDailyQuantity ?? ''), + ], + ), + Row( + children: [ + Texts(TranslationBase.of(context).duration,color: Colors.grey,), + Texts(" "+model.prescriptionReportList[index].days.toString() ?? ''), ], ), SizedBox(height: 12,), @@ -178,13 +190,25 @@ class PrescriptionItemsPage extends StatelessWidget { Row( children: [ Texts(TranslationBase.of(context).route,color: Colors.grey,), - Expanded(child: Texts(model.prescriptionReportEnhList[index].route??'')), + Expanded(child: Texts(" "+model.prescriptionReportEnhList[index].route??'')), ], ), Row( children: [ Texts(TranslationBase.of(context).frequency,color: Colors.grey,), - Texts(model.prescriptionReportEnhList[index].frequency ?? ''), + Texts(" "+model.prescriptionReportEnhList[index].frequency ?? ''), + ], + ), + Row( + children: [ + Texts(TranslationBase.of(context).dailyDoses,color: Colors.grey,), + Texts(" "+model.prescriptionReportEnhList[index].doseDailyQuantity.toString() ?? ''), + ], + ), + Row( + children: [ + Texts(TranslationBase.of(context).duration,color: Colors.grey,), + Texts(" "+model.prescriptionReportList[index].days.toString() ?? ''), ], ), SizedBox(height: 12,), diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index 6e0192a8..64a6105d 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -49,7 +49,7 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred " " + Helpers.capitalize( patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), - fontSize: SizeConfig.textMultiplier * 2.5, + fontSize: SizeConfig.textMultiplier * 2.3, fontWeight: FontWeight.bold, backGroundcolor: Colors.white, fontFamily: 'Poppins', @@ -134,10 +134,9 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred FontWeight.w600, ) : AppText( - DateUtils.convertStringToDateFormat( - patient - .arrivedOn, - 'MM-dd-yyyy HH:mm'), + patient.arrivedOn!=null? DateUtils.convertStringToDateFormat( + patient.arrivedOn, + 'MM-dd-yyyy HH:mm'):'', fontFamily: 'Poppins', fontWeight: diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart index 274d2264..ef26faaa 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart @@ -69,7 +69,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre " " + Helpers.capitalize( patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), - fontSize: SizeConfig.textMultiplier * 2.5, + fontSize: SizeConfig.textMultiplier * 2.3, fontWeight: FontWeight.bold, backGroundcolor: Colors.white, fontFamily: 'Poppins',