diff --git a/lib/UpdatePage.dart b/lib/UpdatePage.dart index dc94b6e6..bb131457 100644 --- a/lib/UpdatePage.dart +++ b/lib/UpdatePage.dart @@ -1,12 +1,13 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/secondary_button.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; import 'dart:io' show Platform; +import 'widgets/shared/buttons/secondary_button.dart'; + class UpdatePage extends StatelessWidget { final String message; final String androidLink; @@ -32,14 +33,14 @@ class UpdatePage extends StatelessWidget { ), Image.asset('assets/images/HMG_logo.png'), SizedBox(height: 8,), - Texts( + AppText( TranslationBase.of(context).updateTheApp.toUpperCase(),fontSize: 17, fontWeight: FontWeight.w600, ), SizedBox(height: 12,), Padding( padding: const EdgeInsets.all(8.0), - child: Texts(message??"Update the app",fontSize: 12,), + child: AppText(message??"Update the app",fontSize: 12,), ) ], ), diff --git a/lib/screens/QR_reader_screen.dart b/lib/screens/QR_reader_screen.dart index de077495..e1453117 100644 --- a/lib/screens/QR_reader_screen.dart +++ b/lib/screens/QR_reader_screen.dart @@ -9,9 +9,10 @@ import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; + import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -93,11 +94,11 @@ class _QrReaderScreenState extends State { SizedBox( height: 35, ), - Button( - onTap: () { + AppButton( + title : TranslationBase.of(context).scanQr, + onPressed: () { _scanQrAndGetPatient(context, model); }, - title: TranslationBase.of(context).scanQr, loading: isLoading, icon: Image.asset('assets/images/qr_code_white.png'), ), diff --git a/lib/screens/doctor/doctor_repaly_chat.dart b/lib/screens/doctor/doctor_repaly_chat.dart index 4387f28f..46c61001 100644 --- a/lib/screens/doctor/doctor_repaly_chat.dart +++ b/lib/screens/doctor/doctor_repaly_chat.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index b18e6f76..cce59e39 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -20,7 +20,7 @@ import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/dashboard/guage_chart.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/profile-welcome-widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/cupertino.dart'; @@ -776,7 +776,7 @@ class _HomeScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - Texts( + AppText( value.kPIName, medium: true, ), diff --git a/lib/screens/live_care/panding_list.dart b/lib/screens/live_care/panding_list.dart index 251f9594..6a24b686 100644 --- a/lib/screens/live_care/panding_list.dart +++ b/lib/screens/live_care/panding_list.dart @@ -149,8 +149,6 @@ class _LiveCarePandingListState extends State { fontWeight: FontWeight .bold, - backGroundcolor: - Colors.white, ), SizedBox( height: 8, @@ -167,8 +165,6 @@ class _LiveCarePandingListState extends State { fontWeight: FontWeight .bold, - backGroundcolor: - Colors.white, ), AppText( TranslationBase.of( @@ -183,8 +179,6 @@ class _LiveCarePandingListState extends State { fontWeight: FontWeight .bold, - backGroundcolor: - Colors.white, ), SizedBox( height: 8, diff --git a/lib/screens/medical-file/medical_file_details.dart b/lib/screens/medical-file/medical_file_details.dart index 30a7b9b4..a1a3c1c4 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; @@ -332,7 +332,7 @@ class _MedicalFileDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( TranslationBase.of( context) .historyOfPresentIllness @@ -454,7 +454,7 @@ class _MedicalFileDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( TranslationBase.of( context) .assessment @@ -698,7 +698,7 @@ class _MedicalFileDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( TranslationBase.of( context) .test @@ -932,7 +932,7 @@ class _MedicalFileDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( TranslationBase.of( context) .physicalSystemExamination @@ -1105,7 +1105,7 @@ class _MedicalFileDetailsState extends State { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: Texts('No Data For This Visit '), + child: AppText('No Data For This Visit '), ), SizedBox( height: 100, diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index 25b76fed..92054e36 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -13,7 +13,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header- import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; @@ -186,7 +186,7 @@ class _MedicalFilePageState extends State { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: Texts('No Medical File Found'), + child: AppText('No Medical File Found'), ) ], ), diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index 7325cd37..6f16c515 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -12,9 +12,9 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/medicine/medicine_item_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/patients/ECGPage.dart b/lib/screens/patients/ECGPage.dart index d881feaa..b703084b 100644 --- a/lib/screens/patients/ECGPage.dart +++ b/lib/screens/patients/ECGPage.dart @@ -8,7 +8,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -41,8 +41,8 @@ class ECGPage extends StatelessWidget { children: [ // PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType), SizedBox(height: 12,), - Texts('Service',style: "caption2",color: Colors.black,), - Texts('ECG',bold: true,fontSize: 22,), + AppText('Service',style: "caption2",color: Colors.black,), + AppText('ECG',bold: true,fontSize: 22,), SizedBox(height: 12,), ...List.generate(model.patientMuseResultsModelList.length, (index) => InkWell( onTap: () async { @@ -68,7 +68,7 @@ class ECGPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts('ECG Report',fontWeight: FontWeight.w700,fontSize: 17,), + AppText('ECG Report',fontWeight: FontWeight.w700,fontSize: 17,), SizedBox(height:3), RichText( text: TextSpan( @@ -101,8 +101,8 @@ class ECGPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.end, children: [ - Texts('${DateUtils.getDayMonthYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime,isArabic: projectViewModel.isArabic)}',color: Colors.black,fontWeight: FontWeight.w600,fontSize: 14,), - Texts('${DateUtils.getHour(model.patientMuseResultsModelList[index].createdOnDateTime)}',fontWeight: FontWeight.w600,color: Colors.grey[700],fontSize: 14,), + AppText('${DateUtils.getDayMonthYearDateFormatted(model.patientMuseResultsModelList[index].createdOnDateTime,isArabic: projectViewModel.isArabic)}',color: Colors.black,fontWeight: FontWeight.w600,fontSize: 14,), + AppText('${DateUtils.getHour(model.patientMuseResultsModelList[index].createdOnDateTime)}',fontWeight: FontWeight.w600,color: Colors.grey[700],fontSize: 14,), ], ), ), diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index f6a7dbee..605d61b3 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; @@ -137,7 +137,7 @@ class _InsuranceApprovalScreenNewState Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: Texts('No Insurance Approval Found'), + child: AppText('No Insurance Approval Found'), ) ], ), diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index c5331910..bcb8e7d5 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -93,7 +93,7 @@ class _InsuranceApprovalsDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( model.insuranceApproval[indexInsurance] .approvalStatusDescption != null @@ -118,7 +118,7 @@ class _InsuranceApprovalsDetailsState extends State { ), Row( children: [ - Texts( + AppText( model.insuranceApproval[indexInsurance] .doctorName .toUpperCase(), @@ -174,13 +174,13 @@ class _InsuranceApprovalsDetailsState extends State { ), Row( children: [ - Texts( + AppText( 'Clinic: ', color: Colors.grey[500], fontSize: 14, ), Expanded( - child: Texts( + child: AppText( model .insuranceApproval[ indexInsurance] @@ -192,12 +192,12 @@ class _InsuranceApprovalsDetailsState extends State { ), Row( children: [ - Texts( + AppText( 'Approval No: ', color: Colors.grey[500], fontSize: 14, ), - Texts( + AppText( model .insuranceApproval[ indexInsurance] @@ -209,12 +209,12 @@ class _InsuranceApprovalsDetailsState extends State { ), Row( children: [ - Texts( + AppText( 'Unused Count:', color: Colors.grey[500], fontSize: 14, ), - Texts(model + AppText(model .insuranceApproval[ indexInsurance] .unUsedCount @@ -226,21 +226,21 @@ class _InsuranceApprovalsDetailsState extends State { ), Row( children: [ - Texts( + AppText( 'Company Name :', color: Colors.grey[500], ), - Texts('Sample') + AppText('Sample') ], ), Row( children: [ - Texts( + AppText( 'Receipt on: ', color: Colors.grey[500], ), Expanded( - child: Texts( + child: AppText( '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn), isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, @@ -250,11 +250,11 @@ class _InsuranceApprovalsDetailsState extends State { ), Row( children: [ - Texts( + AppText( 'Exp on: ', color: Colors.grey[500], ), - Texts( + AppText( '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, @@ -280,19 +280,19 @@ class _InsuranceApprovalsDetailsState extends State { child: Row( children: [ Expanded( - child: Texts( + child: AppText( 'Procedure', fontWeight: FontWeight.w700, ), ), Expanded( - child: Texts( + child: AppText( 'Status', fontWeight: FontWeight.w700, ), ), Expanded( - child: Texts( + child: AppText( 'Usage Status', fontWeight: FontWeight.w700, ), @@ -324,7 +324,7 @@ class _InsuranceApprovalsDetailsState extends State { Expanded( child: Container( - child: Texts(model + child: AppText(model .insuranceApproval[ indexInsurance] ?.apporvalDetails[ @@ -336,7 +336,7 @@ class _InsuranceApprovalsDetailsState extends State { Expanded( child: Container( - child: Texts(model + child: AppText(model .insuranceApproval[ indexInsurance] ?.apporvalDetails[ @@ -347,7 +347,7 @@ class _InsuranceApprovalsDetailsState extends State { ), Expanded( child: Container( - child: Texts(model + child: AppText(model .insuranceApproval[ indexInsurance] ?.apporvalDetails[ diff --git a/lib/screens/patients/patient_search_screen.dart b/lib/screens/patients/patient_search_screen.dart index fe87e59a..c745fd61 100644 --- a/lib/screens/patients/patient_search_screen.dart +++ b/lib/screens/patients/patient_search_screen.dart @@ -15,9 +15,9 @@ import '../../config/config.dart'; import '../../config/size_config.dart'; import '../../lookups/patient_lookup.dart'; import '../../widgets/patients/dynamic_elements.dart'; -import '../../widgets/shared/app_buttons_widget.dart'; +import '../../widgets/shared/buttons/app_buttons_widget.dart'; import '../../widgets/shared/app_scaffold_widget.dart'; -import '../../widgets/shared/user-guid/text_fields/app_text_form_field.dart'; +import '../../widgets/shared/text_fields/app_text_form_field.dart'; import '../../widgets/shared/app_texts_widget.dart'; import '../../widgets/shared/rounded_container_widget.dart'; diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index adfb1c8c..014f656d 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -17,7 +17,7 @@ import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/PatientCard.dart'; import 'package:doctor_app_flutter/widgets/patients/clinic_list_dropdwon.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; @@ -450,7 +450,7 @@ class _PatientsScreenState extends State { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: Texts(TranslationBase.of(context) + child: AppText(TranslationBase.of(context) .youDontHaveAnyPatient), ) ], @@ -586,7 +586,7 @@ class _PatientsScreenState extends State { padding: const EdgeInsets .all(8.0), - child: Texts( + child: AppText( TranslationBase.of( context) .youDontHaveAnyPatient), diff --git a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart index ec7a7355..d714603c 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-detail-screen.dart @@ -16,7 +16,8 @@ import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetN import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; + import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -47,9 +48,9 @@ class _UcafDetailScreenState extends State { }, builder: (_, model, w) => AppScaffold( baseViewModel: model, - isShowAppBar: true, - appBar: PatientProfileHeaderNewDesignAppBar( - patient, patientType, arrivalType), + isShowAppBar: true, + appBar: PatientProfileHeaderNewDesignAppBar( + patient, patientType, arrivalType), appBarTitle: TranslationBase.of(context).ucaf, body: Column( children: [ @@ -114,18 +115,19 @@ class _UcafDetailScreenState extends State { children: [ Expanded( child: Container( - child: BorderedButton( - TranslationBase.of(context).cancel, + child: AppButton( + title: TranslationBase.of(context).cancel, hasBorder: true, vPadding: 8, hPadding: 8, borderColor: Colors.white, - backgroundColor: Colors.white, - textColor: HexColor("#B8382B"), - fontSize: SizeConfig.textMultiplier * 2.2, - handler: () { + color: Colors.white, + fontColor: HexColor("#B8382B"), + fontSize: 2.2, + onPressed: () { Navigator.of(context).popUntil((route) { - return route.settings.name == PATIENTS_PROFILE; + return route.settings.name == + PATIENTS_PROFILE; }); }, ), @@ -136,22 +138,24 @@ class _UcafDetailScreenState extends State { ), Expanded( child: Container( - child: BorderedButton( - TranslationBase.of(context).save, + child: AppButton( + title: TranslationBase.of(context).save, hasBorder: true, vPadding: 8, hPadding: 8, borderColor: HexColor("#B8382B"), - backgroundColor: HexColor("#B8382B"), - textColor: Colors.white, - fontSize: SizeConfig.textMultiplier * 2.0, - handler: () async { + color: HexColor("#B8382B"), + fontColor: Colors.white, + fontSize: 2.0, + onPressed: () async { await model.postUCAF(patient); if (model.state == ViewState.Idle) { DrAppToastMsg.showSuccesToast( - TranslationBase.of(context).postUcafSuccessMsg); + TranslationBase.of(context) + .postUcafSuccessMsg); Navigator.of(context).popUntil((route) { - return route.settings.name == PATIENTS_PROFILE; + return route.settings.name == + PATIENTS_PROFILE; }); } else { DrAppToastMsg.showErrorToast(model.error); @@ -163,7 +167,6 @@ class _UcafDetailScreenState extends State { ], ), ), - ], ), )); diff --git a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart index c92eb066..32eb99f5 100644 --- a/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart +++ b/lib/screens/patients/profile/UCAF/UCAF-input-screen.dart @@ -9,8 +9,8 @@ import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/PatientHeaderWidgetNoAvatar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app-textfield-custom.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/patients/profile/admission-request/admission-request-detail-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-detail-screen.dart index 23e33db3..51ce2873 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-detail-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-detail-screen.dart @@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; diff --git a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart index 054c1d8f..0572f255 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-first-screen.dart @@ -11,8 +11,8 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app-textfield-custom.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; diff --git a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart index 145017d0..cec0eb03 100644 --- a/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request-third-screen.dart @@ -13,8 +13,8 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app-textfield-custom.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; diff --git a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart index 6f63c194..8adf55cd 100644 --- a/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart +++ b/lib/screens/patients/profile/admission-request/admission-request_second-screen.dart @@ -14,8 +14,8 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app-textfield-custom.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; diff --git a/lib/screens/patients/profile/lab_result/FlowChartPage.dart b/lib/screens/patients/profile/lab_result/FlowChartPage.dart index 6f1e0888..c6b32bb2 100644 --- a/lib/screens/patients/profile/lab_result/FlowChartPage.dart +++ b/lib/screens/patients/profile/lab_result/FlowChartPage.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/labs_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; diff --git a/lib/screens/patients/profile/lab_result/LabResultWidget.dart b/lib/screens/patients/profile/lab_result/LabResultWidget.dart index 570e3a6f..9bdd712c 100644 --- a/lib/screens/patients/profile/lab_result/LabResultWidget.dart +++ b/lib/screens/patients/profile/lab_result/LabResultWidget.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/FlowChartPage.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.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:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; @@ -32,7 +32,7 @@ class LabResultWidget extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Texts(filterName), + AppText(filterName), InkWell( onTap: () { Navigator.push( @@ -46,7 +46,7 @@ class LabResultWidget extends StatelessWidget { ), ); }, - child: Texts( + child: AppText( TranslationBase.of(context).showMoreBtn, textDecoration: TextDecoration.underline, color: Colors.blue, @@ -59,7 +59,7 @@ class LabResultWidget extends StatelessWidget { Expanded( child: Container( child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).description, color: Colors.black,bold: true, ), @@ -69,14 +69,14 @@ class LabResultWidget extends StatelessWidget { Expanded( child: Container( child: Center( - child: Texts(TranslationBase.of(context).value, color: Colors.black,bold: true,), + child: AppText(TranslationBase.of(context).value, color: Colors.black,bold: true,), ), ), ), Expanded( child: Container( child: Center( - child: Texts(TranslationBase.of(context).range, color: Colors.black,bold: true,), + child: AppText(TranslationBase.of(context).range, color: Colors.black,bold: true,), ), ), ) @@ -94,7 +94,7 @@ class LabResultWidget extends StatelessWidget { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( + child: AppText( '${patientLabResultList[index].testCode}\n'+ patientLabResultList[index].description, textAlign: TextAlign.center, @@ -107,7 +107,7 @@ class LabResultWidget extends StatelessWidget { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( + child: AppText( patientLabResultList[index].resultValue+" "+patientLabResultList[index].uOM, textAlign: TextAlign.center, ), @@ -119,7 +119,7 @@ class LabResultWidget extends StatelessWidget { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( + child: AppText( patientLabResultList[index].referanceRange, textAlign: TextAlign.center, ), @@ -148,7 +148,7 @@ class LabResultWidget extends StatelessWidget { children: [ Container( child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).description, color: Colors.black,bold: true, ), @@ -156,12 +156,12 @@ class LabResultWidget extends StatelessWidget { ), Container( child: Center( - child: Texts(TranslationBase.of(context).value, color: Colors.black,bold: true,), + child: AppText(TranslationBase.of(context).value, color: Colors.black,bold: true,), ), ), Container( child: Center( - child: Texts(TranslationBase.of(context).range, color: Colors.black,bold: true,), + child: AppText(TranslationBase.of(context).range, color: Colors.black,bold: true,), ), ), ], @@ -176,7 +176,7 @@ class LabResultWidget extends StatelessWidget { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( + child: AppText( lab.description, textAlign: TextAlign.center, ), @@ -188,7 +188,7 @@ class LabResultWidget extends StatelessWidget { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( + child: AppText( lab.resultValue+" "+lab.uOM, textAlign: TextAlign.center, ), @@ -200,7 +200,7 @@ class LabResultWidget extends StatelessWidget { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( + child: AppText( lab.referanceRange, textAlign: TextAlign.center, ), diff --git a/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart b/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart index a429507e..c8ea46a2 100644 --- a/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart +++ b/lib/screens/patients/profile/lab_result/Lab_Result_details_wideget.dart @@ -3,7 +3,7 @@ import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.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/cupertino.dart'; @@ -49,7 +49,6 @@ class _VitalSignDetailsWidgetState extends State { TranslationBase.of(context).date, fontSize: SizeConfig.textMultiplier * 1.6, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, fontFamily: 'Poppins', ), ), @@ -63,7 +62,6 @@ class _VitalSignDetailsWidgetState extends State { TranslationBase.of(context).labResult, fontSize: SizeConfig.textMultiplier * 1.6, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, fontFamily: 'Poppins', ), // height: 60 @@ -102,7 +100,7 @@ class _VitalSignDetailsWidgetState extends State { '${projectViewModel.isArabic? DateUtils.getWeekDayArabic(date.weekday): DateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? DateUtils.getMonthArabic(date.month) : DateUtils.getMonth(date.month)} ${date.year}', fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w600, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), ), @@ -115,7 +113,7 @@ class _VitalSignDetailsWidgetState extends State { '${vital.resultValue}', fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w600, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), ), diff --git a/lib/screens/patients/profile/lab_result/LineChartCurved.dart b/lib/screens/patients/profile/lab_result/LineChartCurved.dart index fe4677ae..d0e61c10 100644 --- a/lib/screens/patients/profile/lab_result/LineChartCurved.dart +++ b/lib/screens/patients/profile/lab_result/LineChartCurved.dart @@ -59,13 +59,13 @@ class LineChartCurvedState extends State { widget.title, fontSize: SizeConfig.textMultiplier * 2.1, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', textAlign: TextAlign.center, ), Expanded( child: Padding( - padding: const EdgeInsets.only(right: 16.0, left: 6.0), + padding: const EdgeInsets.only(right: 16.0, left: 8.0), child: LineChart( sampleData1(), swapAnimationDuration: const Duration(milliseconds: 250), @@ -99,9 +99,9 @@ class LineChartCurvedState extends State { showTitles: true, getTextStyles: (value) => const TextStyle( color: Colors.black, - fontSize: 12, + fontSize: 11, ), - margin: 22, + margin: 28, rotateAngle:-65, getTitles: (value) { print(value); @@ -213,8 +213,9 @@ class LineChartCurvedState extends State { spots: spots, isCurved: true, colors: [Colors.red], - barWidth: 5, + barWidth: 3, isStrokeCapRound: true, + curveSmoothness: 0.12, dotData: FlDotData( show: false, ), diff --git a/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart b/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart index 6f05d865..c4a196a0 100644 --- a/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart +++ b/lib/screens/patients/profile/lab_result/lab_result_chart_and_detials.dart @@ -51,7 +51,6 @@ class LabResultChartAndDetails extends StatelessWidget { "Graph Details", fontSize: SizeConfig.textMultiplier * 2.1, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, fontFamily: 'Poppins', ), SizedBox(height: 8,), diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart index fdc5759d..388a4859 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/LabResultWidget.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -79,7 +79,7 @@ class _LaboratoryResultWidgetState extends State { children: [ Expanded(child: Container( margin: EdgeInsets.only(left: 10, right: 10), - child: Texts(TranslationBase.of(context).generalResult,bold: true,))), + child: AppText(TranslationBase.of(context).generalResult,bold: true,))), Container( width: 25, height: 25, diff --git a/lib/screens/patients/profile/lab_result/labs_home_page.dart b/lib/screens/patients/profile/lab_result/labs_home_page.dart index 8ae3f3ac..4db7b05a 100644 --- a/lib/screens/patients/profile/lab_result/labs_home_page.dart +++ b/lib/screens/patients/profile/lab_result/labs_home_page.dart @@ -9,9 +9,10 @@ import 'package:doctor_app_flutter/screens/procedures/add_lab_orders.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; @@ -55,13 +56,13 @@ class LabsHomePage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( 'Lab', style: "caption2", color: Colors.black, fontSize: 13, ), - Texts( + AppText( 'Result', bold: true, fontSize: 22, @@ -75,13 +76,13 @@ class LabsHomePage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( 'Lab', style: "caption2", color: Colors.black, fontSize: 13, ), - Texts( + AppText( 'Result', bold: true, fontSize: 22, @@ -135,7 +136,7 @@ class LabsHomePage extends StatelessWidget { SizedBox( height: 10, ), - Texts( + AppText( 'Apply for New Lab Order', color: Colors.grey[600], fontWeight: FontWeight.w600, @@ -186,7 +187,7 @@ class LabsHomePage extends StatelessWidget { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: Texts('No Lab Result Found'), + child: AppText('No Lab Result Found'), ) ], diff --git a/lib/screens/patients/profile/patient_profile_screen.dart b/lib/screens/patients/profile/patient_profile_screen.dart index 63a1247b..da4c6c52 100644 --- a/lib/screens/patients/profile/patient_profile_screen.dart +++ b/lib/screens/patients/profile/patient_profile_screen.dart @@ -10,7 +10,8 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-head import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget_search.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; + import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -103,24 +104,24 @@ class PatientProfileScreen extends StatelessWidget { children: [ Expanded(child: Container()), if (patient.episodeNo == 0) - BorderedButton( - "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", - backgroundColor: patient.patientStatusType == 43 + AppButton( + title: + "${TranslationBase.of(context).createNew}\n${TranslationBase.of(context).episode}", + color: patient.patientStatusType == 43 ? Colors.red.shade700 : Colors.grey.shade700, - textColor: Colors.white, + fontColor: Colors.white, vPadding: 8, radius: 30, hPadding: 20, fontWeight: FontWeight.normal, - fontSize: 12, - fontFamily: 'Poppins', + fontSize: 1.6, icon: Image.asset( "assets/images/create-episod.png", color: Colors.white, height: 30, ), - handler: () async { + onPressed: () async { if (patient.patientStatusType == 43) { PostEpisodeReqModel postEpisodeReqModel = PostEpisodeReqModel( @@ -139,32 +140,30 @@ class PatientProfileScreen extends StatelessWidget { }, ), if (patient.episodeNo != 0) - BorderedButton( - "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", - backgroundColor: - patient.patientStatusType == 43 - ? Colors.red.shade700 - : Colors.grey.shade700, - textColor: Colors.white, + AppButton( + title: + "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", + color: patient.patientStatusType == 43 + ? Colors.red.shade700 + : Colors.grey.shade700, + fontColor: Colors.white, vPadding: 8, radius: 30, hPadding: 20, fontWeight: FontWeight.normal, - fontSize: 12, - fontFamily: 'Poppins', + fontSize: 1.6, icon: Image.asset( "assets/images/modilfy-episode.png", color: Colors.white, height: 30, - ), - handler: () { - if (patient.patientStatusType == 43) { - Navigator.of(context).pushNamed( - UPDATE_EPISODE, - arguments: {'patient': patient}); - } - } - ), + ), + onPressed: () { + if (patient.patientStatusType == 43) { + Navigator.of(context).pushNamed( + UPDATE_EPISODE, + arguments: {'patient': patient}); + } + }), ], ), ), diff --git a/lib/screens/patients/profile/radiology/radiology_details_page.dart b/lib/screens/patients/profile/radiology/radiology_details_page.dart index fc98fefb..61cc686c 100644 --- a/lib/screens/patients/profile/radiology/radiology_details_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_details_page.dart @@ -1,17 +1,12 @@ -import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/radiology/final_radiology.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/radiology_view_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/secondary_button.dart'; +import 'file:///C:/Users/admin/AndroidStudioProjects/doctor_app_flutter/lib/widgets/shared/buttons/secondary_button.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -69,13 +64,13 @@ class RadiologyDetailsPage extends StatelessWidget { SizedBox( height: 5, ), - Texts(TranslationBase.of(context).generalResult), + AppText(TranslationBase.of(context).generalResult), SizedBox( height: 5, ), Padding( padding: const EdgeInsets.all(8.0), - child: Texts( + child: AppText( '${finalRadiology.reportData.trim()}', textAlign: TextAlign.start, fontSize: 17, diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index dfbbdff3..5f5033f7 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; @@ -51,13 +51,13 @@ class RadiologyHomePage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( 'Radiology', style: "caption2", color: Colors.black, fontSize: 13, ), - Texts( + AppText( 'Result', bold: true, fontSize: 22, @@ -71,13 +71,13 @@ class RadiologyHomePage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( 'Radiology', style: "caption2", color: Colors.black, fontSize: 13, ), - Texts( + AppText( 'Result', bold: true, fontSize: 22, @@ -132,7 +132,7 @@ class RadiologyHomePage extends StatelessWidget { SizedBox( height: 10, ), - Texts( + AppText( 'Apply for Radiology Order', color: Colors.grey[600], fontWeight: FontWeight.w600, @@ -173,7 +173,7 @@ class RadiologyHomePage extends StatelessWidget { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: Texts('No Radiology Found'), + child: AppText('No Radiology Found'), ) ], diff --git a/lib/screens/patients/profile/radiology/radiology_report_screen.dart b/lib/screens/patients/profile/radiology/radiology_report_screen.dart index 75be23e8..d5b4fd5d 100644 --- a/lib/screens/patients/profile/radiology/radiology_report_screen.dart +++ b/lib/screens/patients/profile/radiology/radiology_report_screen.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; diff --git a/lib/screens/patients/profile/refer_patient_screen.dart b/lib/screens/patients/profile/refer_patient_screen.dart index 3e4340f5..354e0e5c 100644 --- a/lib/screens/patients/profile/refer_patient_screen.dart +++ b/lib/screens/patients/profile/refer_patient_screen.dart @@ -4,8 +4,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; diff --git a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart index dcba8fba..3dc45677 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -9,11 +9,11 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/profile_medical_info_widget_search.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; + import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; @@ -73,7 +73,6 @@ class MyReferralDetailScreen extends StatelessWidget { .fullName)), fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, fontFamily: 'Poppins', ), ), @@ -113,107 +112,148 @@ class MyReferralDetailScreen extends StatelessWidget { child: Column( children: [ Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ AppText( - pendingReferral.referralStatus != null ? pendingReferral.referralStatus : "", + pendingReferral.referralStatus != null + ? pendingReferral.referralStatus + : "", fontFamily: 'Poppins', - fontSize: 1.9 * SizeConfig.textMultiplier, + fontSize: + 1.9 * SizeConfig.textMultiplier, fontWeight: FontWeight.w700, - color: pendingReferral.referralStatus != null - ? pendingReferral.referralStatus == 'Pending' - ? Color(0xffc4aa54) - : pendingReferral.referralStatus == 'Accepted' - ? Colors.green[700] - : Colors.red[700] + color: pendingReferral + .referralStatus != + null + ? pendingReferral + .referralStatus == + 'Pending' + ? Color(0xffc4aa54) + : pendingReferral + .referralStatus == + 'Accepted' + ? Colors.green[700] + : Colors.red[700] : Colors.grey[500], ), AppText( - pendingReferral.referredOn.split(" ")[0], + pendingReferral.referredOn + .split(" ")[0], fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 2.0 * SizeConfig.textMultiplier, + fontSize: + 2.0 * SizeConfig.textMultiplier, color: Color(0XFF28353E), ) ], ), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, children: [ Row( - mainAxisAlignment: MainAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).fileNumber, + TranslationBase.of(context) + .fileNumber, fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.7 * SizeConfig.textMultiplier, + fontSize: 1.7 * + SizeConfig.textMultiplier, color: Color(0XFF575757), ), AppText( "${pendingReferral.patientID}", fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.8 * SizeConfig.textMultiplier, + fontSize: 1.8 * + SizeConfig.textMultiplier, color: Color(0XFF2E303A), ), ], ), AppText( - pendingReferral.referredOn.split(" ")[1], + pendingReferral.referredOn + .split(" ")[1], fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.8 * SizeConfig.textMultiplier, + fontSize: + 1.8 * SizeConfig.textMultiplier, color: Color(0XFF575757), ) ], ), Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + crossAxisAlignment: + CrossAxisAlignment.center, children: [ Expanded( child: Column( children: [ Row( - mainAxisAlignment: MainAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).referredFrom, + TranslationBase.of(context) + .referredFrom, fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.7 * SizeConfig.textMultiplier, + fontSize: 1.7 * + SizeConfig + .textMultiplier, color: Color(0XFF575757), ), AppText( - pendingReferral.isReferralDoctorSameBranch - ? TranslationBase.of(context).sameBranch - : TranslationBase.of(context) - .otherBranch, + pendingReferral + .isReferralDoctorSameBranch + ? TranslationBase.of( + context) + .sameBranch + : TranslationBase.of( + context) + .otherBranch, fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.8 * SizeConfig.textMultiplier, + fontSize: 1.8 * + SizeConfig + .textMultiplier, color: Color(0XFF2E303A), ), ], ), Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: + MainAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).remarks + " : ", + TranslationBase.of(context) + .remarks + + " : ", fontFamily: 'Poppins', fontWeight: FontWeight.w600, - fontSize: 1.7 * SizeConfig.textMultiplier, + fontSize: 1.7 * + SizeConfig + .textMultiplier, color: Color(0XFF575757), ), Expanded( child: AppText( - pendingReferral.remarksFromSource, + pendingReferral + .remarksFromSource, fontFamily: 'Poppins', - fontWeight: FontWeight.w700, - fontSize: 1.8 * SizeConfig.textMultiplier, + fontWeight: + FontWeight.w700, + fontSize: 1.8 * + SizeConfig + .textMultiplier, color: Color(0XFF2E303A), ), ), @@ -225,52 +265,74 @@ class MyReferralDetailScreen extends StatelessWidget { Row( children: [ AppText( - pendingReferral - .patientDetails.nationalityName != null ? pendingReferral - .patientDetails.nationalityName : "", + pendingReferral.patientDetails + .nationalityName != + null + ? pendingReferral + .patientDetails + .nationalityName + : "", fontWeight: FontWeight.bold, color: Color(0xFF2E303A), - fontSize: 1.4 * SizeConfig.textMultiplier, + fontSize: 1.4 * + SizeConfig.textMultiplier, ), - pendingReferral.nationalityFlagUrl != null + pendingReferral + .nationalityFlagUrl != + null ? ClipRRect( - borderRadius: BorderRadius.circular(20.0), - child: Image.network( - pendingReferral.nationalityFlagUrl, - height: 25, - width: 30, - errorBuilder: (BuildContext context, - Object exception, - StackTrace stackTrace) { - return Text('No Image'); - }, - )) + borderRadius: + BorderRadius.circular( + 20.0), + child: Image.network( + pendingReferral + .nationalityFlagUrl, + height: 25, + width: 30, + errorBuilder: + (BuildContext context, + Object exception, + StackTrace + stackTrace) { + return Text('No Image'); + }, + )) : SizedBox() ], ) ], ), Row( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: + CrossAxisAlignment.start, children: [ Container( - margin: EdgeInsets.only(left: 10, right: 0), - child: Image.asset('assets/images/patient/ic_ref_arrow_up.png', + margin: EdgeInsets.only( + left: 10, right: 0), + child: Image.asset( + 'assets/images/patient/ic_ref_arrow_up.png', height: 50, width: 30, ), ), Container( margin: EdgeInsets.only( - left: 0, top: 25, right: 0, bottom: 0), - padding: EdgeInsets.only(left: 4.0, right: 4.0), + left: 0, + top: 25, + right: 0, + bottom: 0), + padding: EdgeInsets.only( + left: 4.0, right: 4.0), child: Container( width: 40, height: 40, child: CircleAvatar( radius: 25.0, - backgroundImage: NetworkImage(pendingReferral.doctorImageUrl), - backgroundColor: Colors.transparent, + backgroundImage: NetworkImage( + pendingReferral + .doctorImageUrl), + backgroundColor: + Colors.transparent, ), ), ), @@ -278,14 +340,19 @@ class MyReferralDetailScreen extends StatelessWidget { flex: 4, child: Container( margin: EdgeInsets.only( - left: 10, top: 25, right: 10, bottom: 0), + left: 10, + top: 25, + right: 10, + bottom: 0), child: Column( children: [ AppText( - pendingReferral.referredByDoctorInfo, + pendingReferral + .referredByDoctorInfo, fontFamily: 'Poppins', fontWeight: FontWeight.w700, - fontSize: 1.7 * SizeConfig.textMultiplier, + fontSize: 1.7 * + SizeConfig.textMultiplier, color: Color(0XFF2E303A), ), ], @@ -312,39 +379,6 @@ class MyReferralDetailScreen extends StatelessWidget { SizedBox( height: 16, ), - /*Padding( - padding: - const EdgeInsets.symmetric(horizontal: 16.0), - child: AppText( - TranslationBase.of(context).myReferralPatient, - color: Colors.black, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - ),*/ - /*PatientReferralItemWidget( - referralStatus: pendingReferral.referralStatus, - patientName: pendingReferral.patientName, - patientGender: - pendingReferral.patientDetails.gender, - referredDate: - pendingReferral.referredOn.split(" ")[0], - referredTime: - pendingReferral.referredOn.split(" ")[1], - patientID: "${pendingReferral.patientID}", - isSameBranch: - pendingReferral.isReferralDoctorSameBranch, - isReferral: true, - remark: pendingReferral.remarksFromSource, - nationality: pendingReferral - .patientDetails.nationalityName, - nationalityFlag: - pendingReferral.nationalityFlagUrl, - doctorAvatar: pendingReferral.doctorImageUrl, - referralDoctorName: - pendingReferral.referredByDoctorInfo, - clinicDescription: null, - ),*/ Padding( padding: const EdgeInsets.symmetric(horizontal: 16), @@ -367,14 +401,14 @@ class MyReferralDetailScreen extends StatelessWidget { child: Row( children: [ Expanded( - child: BorderedButton( - TranslationBase.of(context).accept, - backgroundColor: Color(0xFF4BA821), - textColor: Colors.white, - fontSize: 16, + child: AppButton( + title: TranslationBase.of(context).accept, + color: Color(0xFF4BA821), + fontColor: Colors.white, + fontSize: 1.6, hPadding: 8, vPadding: 12, - handler: () async { + onPressed: () async { await model.responseReferral( pendingReferral, true); if (model.state == ViewState.ErrorLocal) { @@ -390,17 +424,17 @@ class MyReferralDetailScreen extends StatelessWidget { ), ), SizedBox( - height: 8, + width: 8, ), Expanded( - child: BorderedButton( - TranslationBase.of(context).reject, - backgroundColor: Color(0xFFB9382C), - textColor: Colors.white, - fontSize: 16, + child: AppButton( + title: TranslationBase.of(context).reject, + color: Color(0xFFB9382C), + fontColor: Colors.white, + fontSize: 1.6, hPadding: 8, vPadding: 12, - handler: () async { + onPressed: () async { await model.responseReferral( pendingReferral, true); if (model.state == ViewState.ErrorLocal) { @@ -435,7 +469,7 @@ class MyReferralDetailScreen extends StatelessWidget { "", fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, + fontFamily: 'Poppins', ), ), diff --git a/lib/screens/patients/profile/referral/refer-patient-screen.dart b/lib/screens/patients/profile/referral/refer-patient-screen.dart index 3297a405..80264bc5 100644 --- a/lib/screens/patients/profile/referral/refer-patient-screen.dart +++ b/lib/screens/patients/profile/referral/refer-patient-screen.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; @@ -6,14 +5,11 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/patient-referral-item-widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app-textfield-custom.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; diff --git a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart index 0e642a10..a005f399 100644 --- a/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart +++ b/lib/screens/patients/profile/soap_update/assessment/add_assessment_details.dart @@ -15,14 +15,14 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app-textfield-custom.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/auto_complete_text_field.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/text_field_error.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/text_fields_utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/auto_complete_text_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/text_field_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; @@ -192,7 +192,7 @@ class _AddAssessmentDetailsState extends State { suggestions: model.listOfICD10, itemBuilder: (context, suggestion) => new Padding( - child: Texts(suggestion + child: AppText(suggestion .description + " / " + suggestion.code.toString()), diff --git a/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart index 309df861..3a7a9404 100644 --- a/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart +++ b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart @@ -11,8 +11,8 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; @@ -388,7 +388,7 @@ class _UpdateAssessmentPageState extends State { children: [ Column( children: [ - Texts( + AppText( assessment.createdOn != null ? DateUtils .getDayMonthYearDateFormatted( @@ -401,7 +401,7 @@ class _UpdateAssessmentPageState extends State { fontWeight: FontWeight .w600, fontSize: 14, - ), Texts( + ), AppText( assessment.createdOn != null ? DateUtils.getHour( DateTime.parse( diff --git a/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart b/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart index b9f1bd63..c2bde367 100644 --- a/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart +++ b/lib/screens/patients/profile/soap_update/objective/add_examination_page.dart @@ -7,7 +7,8 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/borderedButton.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; + import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -115,16 +116,15 @@ class _AddExaminationPageState extends State { Container( padding: EdgeInsets.all(16), color: Colors.white, - child: BorderedButton( - "${TranslationBase.of(context).addExamination}", - backgroundColor: HexColor("#359846"), - textColor: Colors.white, + child: AppButton( + title:"${TranslationBase.of(context).addExamination}", + color: HexColor("#359846"), + fontColor: Colors.white, vPadding: 12, radius: 12, fontWeight: FontWeight.w600, fontSize: SizeConfig.textMultiplier * 2.5, - fontFamily: 'Poppins', - handler: () { + onPressed: () { widget.addSelectedExamination(); }, ), diff --git a/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart b/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart index ea933cee..09b08b52 100644 --- a/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart +++ b/lib/screens/patients/profile/soap_update/objective/add_examination_widget.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart b/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart index a3d5ed9b..33deb8db 100644 --- a/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart +++ b/lib/screens/patients/profile/soap_update/objective/examinations_list_search_widget.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_examination.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart index 0e9ada40..bdf68167 100644 --- a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart +++ b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart @@ -11,7 +11,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; diff --git a/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart index b99aea6e..8422f83e 100644 --- a/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart +++ b/lib/screens/patients/profile/soap_update/plan/update_plan_page.dart @@ -12,9 +12,9 @@ import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app-textfield-custom.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -164,12 +164,12 @@ class _UpdatePlanPageState extends State { children: [ Row( children: [ - Texts('Appointment No: ',fontSize: 12,), - Texts(widget.patientProgressNote.appointmentNo??'',fontWeight: FontWeight.w600,), + AppText('Appointment No: ',fontSize: 12,), + AppText(widget.patientProgressNote.appointmentNo??'',fontWeight: FontWeight.w600,), ], ), - Texts( + AppText( widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), fontWeight: FontWeight .w600, @@ -186,13 +186,13 @@ class _UpdatePlanPageState extends State { children: [ Row( children: [ - Texts('Condition: ', + AppText('Condition: ', fontSize: 12,), - Texts( + AppText( widget.patientProgressNote.mName??'',fontWeight: FontWeight.w600), ], ), - Texts( + AppText( widget.patientProgressNote.createdOn !=null?DateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getHour(DateTime.now()), fontWeight: FontWeight.w600, fontSize: 14, @@ -206,7 +206,7 @@ class _UpdatePlanPageState extends State { MainAxisAlignment.start, children: [ Expanded( - child: Texts( + child: AppText( progressNoteController.text, fontSize: 10, ), diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart index 962f8adb..d4666428 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/expandable_SOAP_widget.dart @@ -1,4 +1,4 @@ -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; @@ -39,7 +39,7 @@ class ExpandableSOAPWidget extends StatelessWidget { onTap: onTap, child: Row( children: [ - Texts(headerTitle, + AppText(headerTitle, variant: isExpanded ? "bodyText" : '', fontSize: 15, color: Colors.black), diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart index 02985823..5aacd39c 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/add_allergies.dart @@ -7,7 +7,7 @@ import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_allergies_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart index 6aeadfbc..a8f8de45 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_allergy.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.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:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:flutter/material.dart'; @@ -63,7 +63,7 @@ class _UpdateAllergiesWidgetState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( projectViewModel.isArabic ? selectedAllergy.selectedAllergy.nameAr : selectedAllergy.selectedAllergy.nameEn @@ -73,7 +73,7 @@ class _UpdateAllergiesWidgetState extends State { : TextDecoration.lineThrough, bold: true, color: Color(0xFF2B353E)), - Texts( + AppText( projectViewModel.isArabic ? selectedAllergy.selectedAllergySeverity .nameAr @@ -96,7 +96,7 @@ class _UpdateAllergiesWidgetState extends State { InkWell( child: Row( children: [Container( - child: Texts( + child: AppText( TranslationBase .of(context) .remove, diff --git a/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart b/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart index e0e64288..80e82e3a 100644 --- a/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart +++ b/lib/screens/patients/profile/soap_update/subjective/cheif_complaints/update_Chief_complaints.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app-textfield-custom.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/new_text_Field.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/new_text_Field.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart b/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart index 6f610a8e..bdb37985 100644 --- a/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart +++ b/lib/screens/patients/profile/soap_update/subjective/history/add_history_dialog.dart @@ -4,7 +4,7 @@ import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/master_key_checkbox_search_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; diff --git a/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart b/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart index 41df16ed..f114702d 100644 --- a/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/history/update_history_widget.dart @@ -2,7 +2,7 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/my_selected_history.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -59,7 +59,7 @@ class _UpdateHistoryWidgetState extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Container( - child: Texts( + child: AppText( projectViewModel.isArabic ? myHistory.selectedHistory.nameAr : myHistory.selectedHistory.nameEn, @@ -78,7 +78,7 @@ class _UpdateHistoryWidgetState extends State child: Row( children: [ Container( - child: Texts( + child: AppText( TranslationBase .of(context) .remove, diff --git a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart index 867e8d11..b7239158 100644 --- a/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart +++ b/lib/screens/patients/profile/soap_update/subjective/medication/add_medication.dart @@ -7,14 +7,14 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app-textfield-custom.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/auto_complete_text_field.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/text_field_error.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/text_fields_utils.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/auto_complete_text_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/text_field_error.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; @@ -139,7 +139,7 @@ class _AddMedicationState extends State { itemBuilder: (context, suggestion) => new Padding( - child: Texts(suggestion + child: AppText(suggestion .description + '/' + suggestion diff --git a/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart index c6fc5253..398a2805 100644 --- a/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -16,7 +16,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart index 8393131b..564c8c2c 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart @@ -48,7 +48,6 @@ class LineChartCurved extends StatelessWidget { title, fontSize: SizeConfig.textMultiplier * 2.1, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, fontFamily: 'Poppins', textAlign: TextAlign.center, ), diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart index 3c0e4add..9c06cf13 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurvedBloodPressure.dart @@ -42,7 +42,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget { title, fontSize: SizeConfig.textMultiplier * 2.1, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', textAlign: TextAlign.center, ), diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart index 98238c58..a8592350 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_blood_pressurewideget.dart @@ -64,7 +64,7 @@ class _VitalSignDetailsWidgetState extends State { TranslationBase.of(context).date, fontSize: SizeConfig.textMultiplier * 1.5, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), // height: 60, @@ -86,7 +86,7 @@ class _VitalSignDetailsWidgetState extends State { widget.title2, fontSize: SizeConfig.textMultiplier * 1.5, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), // height: 60 @@ -108,7 +108,7 @@ class _VitalSignDetailsWidgetState extends State { widget.title3, fontSize: SizeConfig.textMultiplier * 1.5, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), // height: 60 @@ -167,7 +167,7 @@ class _VitalSignDetailsWidgetState extends State { // textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.6, fontWeight: FontWeight.w600, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), ), @@ -181,7 +181,7 @@ class _VitalSignDetailsWidgetState extends State { // textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.6, fontWeight: FontWeight.w600, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), ), @@ -195,7 +195,7 @@ class _VitalSignDetailsWidgetState extends State { // textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.6, fontWeight: FontWeight.w600, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), ), diff --git a/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart b/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart index 4941ed87..c9c33e1c 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sign_details_wideget.dart @@ -57,7 +57,7 @@ class _VitalSignDetailsWidgetState extends State { TranslationBase.of(context).date, fontSize: SizeConfig.textMultiplier * 1.6, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), // height: 60, @@ -79,7 +79,7 @@ class _VitalSignDetailsWidgetState extends State { widget.title2, fontSize: SizeConfig.textMultiplier * 1.6, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), // height: 60 @@ -125,7 +125,7 @@ class _VitalSignDetailsWidgetState extends State { // textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w600, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), ), @@ -139,7 +139,7 @@ class _VitalSignDetailsWidgetState extends State { // textAlign: TextAlign.center, fontSize: SizeConfig.textMultiplier * 1.8, fontWeight: FontWeight.w600, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), ), diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart index b4c87129..5d6b7b59 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_and_detials.dart @@ -63,7 +63,7 @@ class VitalSingChartAndDetials extends StatelessWidget { "Graph Details", fontSize: SizeConfig.textMultiplier * 2.1, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), SizedBox(height: 8,), diff --git a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart index 934a88b8..291bbcb5 100644 --- a/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart +++ b/lib/screens/patients/profile/vital_sign/vital_sing_chart_blood_pressure.dart @@ -70,7 +70,7 @@ class VitalSingChartBloodPressure extends StatelessWidget { "Graph Details", fontSize: SizeConfig.textMultiplier * 2.3, fontWeight: FontWeight.bold, - backGroundcolor: Colors.black, + fontFamily: 'Poppins', ), SizedBox(height: 8,), diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 397e1a60..04b0a561 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -17,10 +17,10 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/medicine/medicine_item_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; @@ -357,7 +357,7 @@ class _PrescriptionFormWidgetState extends State { // itemBuilder: (context, // suggestion) => // new Padding( - // child: Texts(suggestion + // child: AppText(suggestion // .description + // '/' + // suggestion diff --git a/lib/screens/prescription/prescription_details_page.dart b/lib/screens/prescription/prescription_details_page.dart index e5d9ef7d..54a4848e 100644 --- a/lib/screens/prescription/prescription_details_page.dart +++ b/lib/screens/prescription/prescription_details_page.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -45,7 +45,7 @@ class PrescriptionDetailsPage extends StatelessWidget { child: Padding( padding: const EdgeInsets.all(8.0), child: Center( - child: Texts( + child: AppText( prescriptionReport.itemDescription.isNotEmpty ? prescriptionReport.itemDescription : prescriptionReport.itemDescriptionN), @@ -70,7 +70,7 @@ class PrescriptionDetailsPage extends StatelessWidget { height: 30, width: double.infinity, child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).route, fontSize: 14, ))), @@ -79,7 +79,7 @@ class PrescriptionDetailsPage extends StatelessWidget { height: 30, width: double.infinity, child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).frequency, fontSize: 14, ))), @@ -88,7 +88,7 @@ class PrescriptionDetailsPage extends StatelessWidget { width: double.infinity, padding: EdgeInsets.symmetric(horizontal: 4), child: Center( - child: Texts( + child: AppText( "${TranslationBase.of(context).dailyDoses}", fontSize: 14, ))), @@ -97,7 +97,7 @@ class PrescriptionDetailsPage extends StatelessWidget { height: 30, width: double.infinity, child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).duration, fontSize: 14, ))), @@ -144,7 +144,7 @@ class PrescriptionDetailsPage extends StatelessWidget { child: Center( child: Column( children: [ - Texts(TranslationBase.of(context).notes), + AppText(TranslationBase.of(context).notes), SizedBox( height: 5, ), @@ -155,7 +155,7 @@ class PrescriptionDetailsPage extends StatelessWidget { SizedBox( height: 5, ), - Texts(prescriptionReport.remarks ?? ''), + AppText(prescriptionReport.remarks ?? ''), ], ), ), diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index b798418e..dc56f473 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/ShowImageDialog.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; @@ -64,7 +64,7 @@ class PrescriptionItemsPage extends StatelessWidget { children: [ Container( margin: EdgeInsets.only(left: 18,right: 18), - child: Texts(model.prescriptionReportList[index].itemDescription.isNotEmpty ? model.prescriptionReportList[index].itemDescription : model.prescriptionReportList[index].itemDescriptionN,bold: true,)), + child: AppText(model.prescriptionReportList[index].itemDescription.isNotEmpty ? model.prescriptionReportList[index].itemDescription : model.prescriptionReportList[index].itemDescriptionN,bold: true,)), SizedBox(height: 12,), Row( children: [ @@ -100,30 +100,30 @@ class PrescriptionItemsPage extends StatelessWidget { children: [ Row( children: [ - Texts(TranslationBase.of(context).route,color: Colors.grey,), - Expanded(child: Texts(" "+model.prescriptionReportList[index].routeN)), + AppText(TranslationBase.of(context).route,color: Colors.grey,), + Expanded(child: AppText(" "+model.prescriptionReportList[index].routeN)), ], ), Row( children: [ - Texts(TranslationBase.of(context).frequency,color: Colors.grey,), - Texts(" "+model.prescriptionReportList[index].frequencyN ?? ''), + AppText(TranslationBase.of(context).frequency,color: Colors.grey,), + AppText(" "+model.prescriptionReportList[index].frequencyN ?? ''), ], ), Row( children: [ - Texts(TranslationBase.of(context).dailyDoses,color: Colors.grey,), - Texts(" "+model.prescriptionReportList[index].doseDailyQuantity ?? ''), + AppText(TranslationBase.of(context).dailyDoses,color: Colors.grey,), + AppText(" "+model.prescriptionReportList[index].doseDailyQuantity ?? ''), ], ), Row( children: [ - Texts(TranslationBase.of(context).duration,color: Colors.grey,), - Texts(" "+model.prescriptionReportList[index].days.toString() ?? ''), + AppText(TranslationBase.of(context).duration,color: Colors.grey,), + AppText(" "+model.prescriptionReportList[index].days.toString() ?? ''), ], ), SizedBox(height: 12,), - Texts(model.prescriptionReportList[index].remarks ?? ''), + AppText(model.prescriptionReportList[index].remarks ?? ''), ], ),) @@ -151,7 +151,7 @@ class PrescriptionItemsPage extends StatelessWidget { children: [ Container( margin: EdgeInsets.only(left: 18,right: 18), - child: Texts(model.prescriptionReportEnhList[index].itemDescription,bold: true,),), + child: AppText(model.prescriptionReportEnhList[index].itemDescription,bold: true,),), SizedBox(height: 12,), Row( mainAxisAlignment: MainAxisAlignment.start, @@ -190,30 +190,30 @@ class PrescriptionItemsPage extends StatelessWidget { children: [ Row( children: [ - Texts(TranslationBase.of(context).route,color: Colors.grey,), - Expanded(child: Texts(" "+model.prescriptionReportEnhList[index].route??'')), + AppText(TranslationBase.of(context).route,color: Colors.grey,), + Expanded(child: AppText(" "+model.prescriptionReportEnhList[index].route??'')), ], ), Row( children: [ - Texts(TranslationBase.of(context).frequency,color: Colors.grey,), - Texts(" "+model.prescriptionReportEnhList[index].frequency ?? ''), + AppText(TranslationBase.of(context).frequency,color: Colors.grey,), + AppText(" "+model.prescriptionReportEnhList[index].frequency ?? ''), ], ), Row( children: [ - Texts(TranslationBase.of(context).dailyDoses,color: Colors.grey,), - Texts(" "+model.prescriptionReportEnhList[index].doseDailyQuantity.toString() ?? ''), + AppText(TranslationBase.of(context).dailyDoses,color: Colors.grey,), + AppText(" "+model.prescriptionReportEnhList[index].doseDailyQuantity.toString() ?? ''), ], ), Row( children: [ - Texts(TranslationBase.of(context).duration,color: Colors.grey,), - Texts(" "+model.prescriptionReportList[index].days.toString() ?? ''), + AppText(TranslationBase.of(context).duration,color: Colors.grey,), + AppText(" "+model.prescriptionReportList[index].days.toString() ?? ''), ], ), SizedBox(height: 12,), - Texts(model.prescriptionReportEnhList[index].remarks?? ''), + AppText(model.prescriptionReportEnhList[index].remarks?? ''), ], ),) diff --git a/lib/screens/prescription/prescription_warnings.dart b/lib/screens/prescription/prescription_warnings.dart index f5773af8..c338590e 100644 --- a/lib/screens/prescription/prescription_warnings.dart +++ b/lib/screens/prescription/prescription_warnings.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; diff --git a/lib/screens/prescription/prescriptions_page.dart b/lib/screens/prescription/prescriptions_page.dart index fafd753d..73c7325f 100644 --- a/lib/screens/prescription/prescriptions_page.dart +++ b/lib/screens/prescription/prescriptions_page.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_expandable_notifier_new.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/doctor_card.dart'; @@ -49,13 +49,13 @@ class PrescriptionsPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( 'Order', style: "caption2", color: Colors.black, fontSize: 13, ), - Texts( + AppText( 'Prescriptions', bold: true, fontSize: 22, @@ -69,13 +69,13 @@ class PrescriptionsPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( 'Order', style: "caption2", color: Colors.black, fontSize: 13, ), - Texts( + AppText( 'Prescriptions', bold: true, fontSize: 22, @@ -121,7 +121,7 @@ class PrescriptionsPage extends StatelessWidget { SizedBox( height: 10, ), - Texts( + AppText( 'Apply for New Prescriptions Order', color: Colors.grey[600], fontWeight: FontWeight.w600, @@ -170,7 +170,7 @@ class PrescriptionsPage extends StatelessWidget { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: Texts('No Lab Result Found'), + child: AppText('No Lab Result Found'), ) ], diff --git a/lib/screens/prescription/update_prescription_form.dart b/lib/screens/prescription/update_prescription_form.dart index 27c56ed0..3d26d0ad 100644 --- a/lib/screens/prescription/update_prescription_form.dart +++ b/lib/screens/prescription/update_prescription_form.dart @@ -12,9 +12,9 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; @@ -204,7 +204,7 @@ class _UpdatePrescriptionFormState extends State { // itemBuilder: (context, // suggestion) => // new Padding( - // child: Texts(suggestion + // child: AppText(suggestion // .description + // '/' + // suggestion.genericName), diff --git a/lib/screens/procedures/ProcedureCard.dart b/lib/screens/procedures/ProcedureCard.dart index 761db652..ed450df0 100644 --- a/lib/screens/procedures/ProcedureCard.dart +++ b/lib/screens/procedures/ProcedureCard.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/FlowChartPage.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -72,7 +72,7 @@ class ProcedureCard extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( entityList.orderType == 0 ? 'Routine' : 'Urgent', @@ -84,7 +84,7 @@ class ProcedureCard extends StatelessWidget { SizedBox( height: 5, ), - Texts( + AppText( entityList.procedureName, bold: true, fontSize: 14, @@ -99,13 +99,13 @@ class ProcedureCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end, children: [ - Texts( + AppText( '${DateUtils.getDayMonthYearDateFormatted(DateUtils.convertISOStringToDateTime(entityList.orderDate), isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, fontSize: 14, ), - Texts( + AppText( '${DateUtils.getHour(DateUtils.convertISOStringToDateTime(entityList.orderDate))}', fontWeight: FontWeight.w600, color: Colors.grey[700], @@ -117,13 +117,13 @@ class ProcedureCard extends StatelessWidget { ), Row( children: [ - Texts( + AppText( TranslationBase.of(context).orderNo, //color: Colors.grey, fontSize: 12, color: Colors.grey, ), - Texts( + AppText( entityList.orderNo.toString(), fontSize: 12, bold: true, @@ -132,13 +132,13 @@ class ProcedureCard extends StatelessWidget { ), Row( children: [ - Texts( + AppText( TranslationBase.of(context).doctorName + ": ", //color: Colors.grey, fontSize: 12, color: Colors.grey, ), - Texts( + AppText( entityList.doctorName.toString(), fontSize: 12, bold: true, @@ -147,13 +147,13 @@ class ProcedureCard extends StatelessWidget { ), Row( children: [ - Texts( + AppText( TranslationBase.of(context).clinic + ": ", //color: Colors.grey, fontSize: 12, color: Colors.grey, ), - Texts( + AppText( entityList.clinicDescription ?? "", bold: true, fontSize: 12, @@ -174,7 +174,7 @@ class ProcedureCard extends StatelessWidget { ), ); }, - child: Texts( + child: AppText( TranslationBase.of(context).showMoreBtn, textDecoration: TextDecoration.underline, color: Colors.blue, @@ -184,7 +184,7 @@ class ProcedureCard extends StatelessWidget { // Row( // mainAxisAlignment: MainAxisAlignment.spaceBetween, // children: [ - // Texts( + // AppText( // entityList.remarks.toString() ?? '', // fontSize: 12, // ), diff --git a/lib/screens/procedures/add-procedure-form.dart b/lib/screens/procedures/add-procedure-form.dart index 92a74e77..c08499da 100644 --- a/lib/screens/procedures/add-procedure-form.dart +++ b/lib/screens/procedures/add-procedure-form.dart @@ -12,7 +12,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; diff --git a/lib/screens/procedures/add_lab_orders.dart b/lib/screens/procedures/add_lab_orders.dart index 92f62746..c843cd21 100644 --- a/lib/screens/procedures/add_lab_orders.dart +++ b/lib/screens/procedures/add_lab_orders.dart @@ -12,7 +12,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; diff --git a/lib/screens/procedures/add_radiology_order.dart b/lib/screens/procedures/add_radiology_order.dart index 1dd30467..c942004d 100644 --- a/lib/screens/procedures/add_radiology_order.dart +++ b/lib/screens/procedures/add_radiology_order.dart @@ -12,7 +12,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; diff --git a/lib/screens/procedures/entity_list_checkbox_search_widget.dart b/lib/screens/procedures/entity_list_checkbox_search_widget.dart index 0ca2e360..90f51cef 100644 --- a/lib/screens/procedures/entity_list_checkbox_search_widget.dart +++ b/lib/screens/procedures/entity_list_checkbox_search_widget.dart @@ -4,9 +4,9 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; @@ -120,7 +120,7 @@ class _EntityListCheckboxSearchWidgetState child: Padding( padding: const EdgeInsets.symmetric( horizontal: 10, vertical: 0), - child: Texts( + child: AppText( historyInfo.procedureName, fontSize: 14.0, variant: "bodyText", diff --git a/lib/screens/procedures/entity_list_procedure_widget.dart b/lib/screens/procedures/entity_list_procedure_widget.dart index 2f5c6ea2..15fc27b6 100644 --- a/lib/screens/procedures/entity_list_procedure_widget.dart +++ b/lib/screens/procedures/entity_list_procedure_widget.dart @@ -2,9 +2,9 @@ import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/procedure/categories_procedure.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; @@ -112,7 +112,7 @@ class _ProcedureListWidgetState extends State { child: Padding( padding: const EdgeInsets.symmetric( horizontal: 10, vertical: 0), - child: Texts( + child: AppText( historyInfo.procedureName, variant: "bodyText", bold: true, diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index d9e8d8ab..ebeb1d4f 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; @@ -50,13 +50,13 @@ class ProcedureScreen extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( 'Order Test or', style: "caption2", color: Colors.black, fontSize: 13, ), - Texts( + AppText( 'Procedure', bold: true, fontSize: 22, @@ -70,13 +70,13 @@ class ProcedureScreen extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( 'Order Test or', style: "caption2", color: Colors.black, fontSize: 13, ), - Texts( + AppText( 'Procedure', bold: true, fontSize: 22, @@ -128,7 +128,7 @@ class ProcedureScreen extends StatelessWidget { SizedBox( height: 10, ), - Texts( + AppText( 'Add More Procedure', color: Colors.grey[600], fontWeight: FontWeight.w600, @@ -188,7 +188,7 @@ class ProcedureScreen extends StatelessWidget { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: Texts('No Procedure Found'), + child: AppText('No Procedure Found'), ) ], ), @@ -204,7 +204,7 @@ class ProcedureScreen extends StatelessWidget { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(22.0), - child: Texts(model.error), + child: AppText(model.error), ) ], ), diff --git a/lib/screens/procedures/update-procedure.dart b/lib/screens/procedures/update-procedure.dart index e1da3739..c2361b0c 100644 --- a/lib/screens/procedures/update-procedure.dart +++ b/lib/screens/procedures/update-procedure.dart @@ -13,7 +13,7 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/dailog-list-select.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; diff --git a/lib/screens/reschedule-leaves/reschedule_leave.dart b/lib/screens/reschedule-leaves/reschedule_leave.dart index 3ab34bea..c342713a 100644 --- a/lib/screens/reschedule-leaves/reschedule_leave.dart +++ b/lib/screens/reschedule-leaves/reschedule_leave.dart @@ -12,10 +12,10 @@ import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -880,7 +880,7 @@ class _RescheduleLeaveScreen extends State { ), // Column( // children: [ - // Texts(TranslationBase.of(context) + // AppText(TranslationBase.of(context) // .previousSickLeaveIssue + // ' ') // ], diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart index 45088b8d..184f9f9a 100644 --- a/lib/screens/sick-leave/add-sickleave.dart +++ b/lib/screens/sick-leave/add-sickleave.dart @@ -13,7 +13,7 @@ import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header- import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; @@ -252,7 +252,7 @@ class AddSickLeavScreen extends StatelessWidget { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: Texts('No Sick Leave Found'), + child: AppText('No Sick Leave Found'), ) ], ), diff --git a/lib/screens/sick-leave/sick_leave.dart b/lib/screens/sick-leave/sick_leave.dart index e05f6046..868da109 100644 --- a/lib/screens/sick-leave/sick_leave.dart +++ b/lib/screens/sick-leave/sick_leave.dart @@ -12,10 +12,10 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -424,7 +424,7 @@ class _SickLeaveScreenState extends State { ), // Column( // children: [ - // Texts(TranslationBase.of(context) + // AppText(TranslationBase.of(context) // .previousSickLeaveIssue + // ' ') // ], diff --git a/lib/util/dr_app_toast_msg.dart b/lib/util/dr_app_toast_msg.dart index a8d2fc53..1f2ebe8f 100644 --- a/lib/util/dr_app_toast_msg.dart +++ b/lib/util/dr_app_toast_msg.dart @@ -68,7 +68,7 @@ class DrAppToastMsg { radius: 20, elevation: 10, textColor: Colors.white, - backgroundColor: Colors.black, + timeInSeconds: 2); } diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index 122d8c49..b15246ff 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -1,9 +1,10 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/viewModel/imei_view_model.dart'; import 'package:doctor_app_flutter/screens/auth/verification_methods_screen.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app_text_form_field.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; + +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; @@ -225,10 +226,11 @@ class _LoginFormState extends State { mainAxisAlignment: MainAxisAlignment.end, children: [ Expanded( - child: Button( + child: AppButton( title: TranslationBase.of(context).login, color: HexColor('#D02127'), - onTap: () { + fontWeight: FontWeight.bold, + onPressed: () { login(context, this.widget.model); }, )), diff --git a/lib/widgets/auth/verification_methods.dart b/lib/widgets/auth/verification_methods.dart index 56ad5c62..d8e374be 100644 --- a/lib/widgets/auth/verification_methods.dart +++ b/lib/widgets/auth/verification_methods.dart @@ -13,8 +13,10 @@ import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/otp/sms-popup.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; + import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; + import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; @@ -315,11 +317,11 @@ class _VerificationMethodsState extends State { ? Row( children: [ Expanded( - child: Button( + child: AppButton( title: TranslationBase.of(context) .useAnotherAccount, color: Colors.red[700], - onTap: () { + onPressed: () { Navigator.of(context).pushNamed(LOGIN); }, )), diff --git a/lib/widgets/doctor/doctor_reply_widget.dart b/lib/widgets/doctor/doctor_reply_widget.dart index ad2ee7f3..5e8fb8cf 100644 --- a/lib/widgets/doctor/doctor_reply_widget.dart +++ b/lib/widgets/doctor/doctor_reply_widget.dart @@ -110,7 +110,6 @@ class _DoctorReplyWidgetState extends State { Helpers.capitalize( widget.reply.patientName), fontSize: SizeConfig.textMultiplier * 2.5, fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, fontFamily: 'Poppins', ), ), diff --git a/lib/widgets/doctor/lab_result_widget.dart b/lib/widgets/doctor/lab_result_widget.dart index 5ca50864..c4343a4b 100644 --- a/lib/widgets/doctor/lab_result_widget.dart +++ b/lib/widgets/doctor/lab_result_widget.dart @@ -1,6 +1,6 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/models/patient/lab_result/lab_result.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.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:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -72,7 +72,7 @@ class _LabResultWidgetState extends State { ), ), child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).description, color: Colors.white, ), @@ -84,7 +84,7 @@ class _LabResultWidgetState extends State { child: Container( color: HexColor('#515B5D'), child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).value, color: Colors.white), ), @@ -99,7 +99,7 @@ class _LabResultWidgetState extends State { ), ), child: Center( - child: Texts( + child: AppText( TranslationBase.of(context).range, color: Colors.white), ), @@ -135,7 +135,7 @@ class _LabResultWidgetState extends State { ), ), child: Center( - child: Texts( + child: AppText( '${result.description}', color: Colors.grey[800], ), @@ -146,7 +146,7 @@ class _LabResultWidgetState extends State { Expanded( child: Container( child: Center( - child: Texts('${result.resultValue}', + child: AppText('${result.resultValue}', color: Colors.grey[800]), ), height: 60), @@ -154,7 +154,7 @@ class _LabResultWidgetState extends State { Expanded( child: Container( child: Center( - child: Texts( + child: AppText( '${result.referenceRange}', color: Colors.grey[800]), ), diff --git a/lib/widgets/doctor/my_referral_patient_widget.dart b/lib/widgets/doctor/my_referral_patient_widget.dart index 98371a9f..d7162d3e 100644 --- a/lib/widgets/doctor/my_referral_patient_widget.dart +++ b/lib/widgets/doctor/my_referral_patient_widget.dart @@ -5,10 +5,12 @@ import 'package:doctor_app_flutter/models/patient/my_referral/my_referral_patien import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; -import 'package:doctor_app_flutter/widgets/shared/app_button.dart'; + import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart'; + import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:flutter/cupertino.dart'; @@ -21,7 +23,12 @@ class MyReferralPatientWidget extends StatefulWidget { final bool isExpand; final Function expandClick; - MyReferralPatientWidget({Key key, this.myReferralPatientModel, this.model, this.isExpand, this.expandClick}); + MyReferralPatientWidget( + {Key key, + this.myReferralPatientModel, + this.model, + this.isExpand, + this.expandClick}); @override _MyReferralPatientWidgetState createState() => @@ -428,8 +435,9 @@ class _MyReferralPatientWidgetState extends State { Container( width: double.infinity, margin: EdgeInsets.only(left: 10, right: 10), - child: Button( - onTap: () async { + child: AppButton( + title : TranslationBase.of(context).replay, + onPressed: () async { final form = _formKey.currentState; if (form.validate()) { try { @@ -443,7 +451,6 @@ class _MyReferralPatientWidgetState extends State { } } }, - title: TranslationBase.of(context).replay, loading: widget.model.state == ViewState.BusyLocal, ), ) diff --git a/lib/widgets/patients/PatientCard.dart b/lib/widgets/patients/PatientCard.dart index faa7fee5..f204d28e 100644 --- a/lib/widgets/patients/PatientCard.dart +++ b/lib/widgets/patients/PatientCard.dart @@ -5,7 +5,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.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/cupertino.dart'; import 'package:flutter/material.dart'; @@ -110,7 +110,6 @@ class PatientCard extends StatelessWidget { Helpers.capitalize(patientInfo.lastName)), fontSize: 16, fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, fontFamily: 'Poppins', textOverflow: TextOverflow.ellipsis, ), diff --git a/lib/widgets/patients/dynamic_elements.dart b/lib/widgets/patients/dynamic_elements.dart index 1d85574d..dea59eb9 100644 --- a/lib/widgets/patients/dynamic_elements.dart +++ b/lib/widgets/patients/dynamic_elements.dart @@ -1,8 +1,8 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/models/patient/patient_model.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/custom_validation_error.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/user-guid/text_fields/app_text_form_field.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index 98d4f458..1b04f7dd 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -99,7 +99,6 @@ class PatientReferralItemWidget extends StatelessWidget { patientName, fontSize: SizeConfig.textMultiplier * 2.2, fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, color: Colors.black, fontFamily: 'Poppins', ), 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 7ed8579b..93fe4d68 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 @@ -60,7 +60,6 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget : Helpers.capitalize(patient.patientDetails.fullName), fontSize: SizeConfig.textMultiplier * 2.2, fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, fontFamily: 'Poppins', ), ), 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 a626ac7f..17f3abe6 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design.dart @@ -61,7 +61,6 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { : Helpers.capitalize(patient.patientDetails.fullName), fontSize: SizeConfig.textMultiplier * 2.2, fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, fontFamily: 'Poppins', ), ), diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart index 2bfaff23..4726a018 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.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:hexcolor/hexcolor.dart'; @@ -79,7 +79,6 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), fontSize: SizeConfig.textMultiplier *2.2, fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, fontFamily: 'Poppins', ), ), @@ -373,7 +372,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( '${TranslationBase.of(context).dr}.$doctorName', color: Colors.black, fontWeight: FontWeight.w600, @@ -382,11 +381,11 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { if (orderNo != null && !isPrescriptions) Row( children: [ - Texts( + AppText( 'Order No:', color: Colors.grey[800], ), - Texts( + AppText( orderNo ?? '', ) ], @@ -394,11 +393,11 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { if (invoiceNO != null && !isPrescriptions) Row( children: [ - Texts( + AppText( 'Invoice:', color: Colors.grey[800], ), - Texts( + AppText( invoiceNO, ) ], @@ -406,11 +405,11 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { if(isPrescriptions) Row( children: [ - Texts( + AppText( 'Branch:', color: Colors.grey[800], ), - Texts( + AppText( branch?? '', ) ], @@ -418,23 +417,23 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { if(isPrescriptions) Row( children: [ - Texts( + AppText( 'Clinic:', color: Colors.grey[800], ), - Texts( + AppText( clinic?? '', ) ], ), Row( children: [ - Texts( + AppText( !isPrescriptions? 'Result Date:': 'Prescriptions Date', color: Colors.grey[800], ), Expanded( - child: Texts( + child: AppText( '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', ), ) 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 1accfa35..ae85a574 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 @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.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:hexcolor/hexcolor.dart'; @@ -87,7 +87,6 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget : Helpers.capitalize(patient.patientDetails.fullName), fontSize: SizeConfig.textMultiplier * 2.2, fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, fontFamily: 'Poppins', ), ), @@ -323,7 +322,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Texts( + AppText( '${TranslationBase.of(context).dr}$doctorName', color: Colors.black, fontWeight: FontWeight.w600, @@ -332,63 +331,63 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget if (orderNo != null && !isPrescriptions) Row( children: [ - Texts('Order No: ', + AppText('Order No: ', color: Colors.grey[800], fontSize: 12), - Texts(orderNo ?? '', fontSize: 12) + AppText(orderNo ?? '', fontSize: 12) ], ), if (invoiceNO != null && !isPrescriptions) Row( children: [ - Texts('Invoice: ', + AppText('Invoice: ', color: Colors.grey[800], fontSize: 12), - Texts(invoiceNO, fontSize: 12) + AppText(invoiceNO, fontSize: 12) ], ), if (branch != null) Row( children: [ - Texts('Branch: ', + AppText('Branch: ', color: Colors.grey[800], fontSize: 12), - Texts(branch ?? '', fontSize: 12) + AppText(branch ?? '', fontSize: 12) ], ), if (isPrescriptions) if (clinic != null) Row( children: [ - Texts('Clinic: ', + AppText('Clinic: ', color: Colors.grey[800], fontSize: 12), - Texts(clinic ?? '', fontSize: 12) + AppText(clinic ?? '', fontSize: 12) ], ), if (isMedicalFile && episode != null) Row( children: [ - Texts('Episode: ', + AppText('Episode: ', color: Colors.grey[800], fontSize: 12), - Texts(episode ?? '', fontSize: 12) + AppText(episode ?? '', fontSize: 12) ], ), if (isMedicalFile && vistDate != null) Row( children: [ - Texts('Visit Date: ', + AppText('Visit Date: ', color: Colors.grey[800], fontSize: 12), - Texts(vistDate ?? '', fontSize: 12) + AppText(vistDate ?? '', fontSize: 12) ], ), if (!isMedicalFile) Row( children: [ Expanded( - child: Texts( + child: AppText( !isPrescriptions ? 'Result Date: ' : 'Prescriptions Date ', @@ -396,7 +395,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget fontSize: 12, ), ), - Texts( + AppText( '${DateUtils.getDayMonthYearDateFormatted(appointmentDate, isArabic: projectViewModel.isArabic)}', fontSize: 14, ) diff --git a/lib/widgets/patients/vital_sign_details_wideget.dart b/lib/widgets/patients/vital_sign_details_wideget.dart index 7665778a..f66ae8ed 100644 --- a/lib/widgets/patients/vital_sign_details_wideget.dart +++ b/lib/widgets/patients/vital_sign_details_wideget.dart @@ -1,7 +1,7 @@ import 'package:doctor_app_flutter/models/patient/vital_sign/vital_sign_res_model.dart'; import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; -import 'package:doctor_app_flutter/widgets/shared/Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -61,7 +61,7 @@ class _VitalSignDetailsWidgetState extends State { ), ), child: Center( - child: Texts( + child: AppText( widget.title1, color: Colors.white, ), @@ -78,7 +78,7 @@ class _VitalSignDetailsWidgetState extends State { ), ), child: Center( - child: Texts(widget.title2, color: Colors.white), + child: AppText(widget.title2, color: Colors.white), ), height: 60), ) @@ -90,7 +90,7 @@ class _VitalSignDetailsWidgetState extends State { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( + child: AppText( '${DateUtils.getWeekDay(vital.vitalSignDate.weekday)}, ${vital.vitalSignDate.day} ${DateUtils.getMonth(vital.vitalSignDate.month)}, ${vital.vitalSignDate.year} ', textAlign: TextAlign.center, ), @@ -102,7 +102,7 @@ class _VitalSignDetailsWidgetState extends State { padding: EdgeInsets.all(10), color: Colors.white, child: Center( - child: Texts( + child: AppText( '${vital.toJson()[widget.viewKey]}', textAlign: TextAlign.center, ), diff --git a/lib/widgets/shared/StarRating.dart b/lib/widgets/shared/StarRating.dart index 10c12fa5..0019235e 100644 --- a/lib/widgets/shared/StarRating.dart +++ b/lib/widgets/shared/StarRating.dart @@ -1,7 +1,6 @@ import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; - -import 'Text.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; class StarRating extends StatelessWidget { final double totalAverage; @@ -21,7 +20,7 @@ class StarRating extends StatelessWidget { Widget build(BuildContext context) { return Row(mainAxisAlignment: MainAxisAlignment.start, children: [ if (!forceStars && (totalAverage == null || totalAverage == 0)) - Texts("New", style: "caption"), + AppText("New", style: "caption"), if (forceStars || (totalAverage != null && totalAverage > 0)) ...List.generate( 5, @@ -38,7 +37,7 @@ class StarRating extends StatelessWidget { )), if (totalCount != null) SizedBox(width: 9.0), if (totalCount != null) - Texts( + AppText( "(" + totalCount.toString() + ")", style: "overline", color: Colors.grey[400], diff --git a/lib/widgets/shared/Text.dart b/lib/widgets/shared/Text.dart deleted file mode 100644 index d3fa3cb9..00000000 --- a/lib/widgets/shared/Text.dart +++ /dev/null @@ -1,262 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; - -class Texts extends StatefulWidget { - final String text; - final String variant; - final Color color; - final bool bold; - final bool regular; - final bool medium; - final int maxLength; - final bool italic; - final TextAlign textAlign; - final int maxLines; - final bool readMore; - final String style; - final bool allowExpand; - final double fontSize; - final FontWeight fontWeight; - final TextDecoration textDecoration; - - Texts(this.text, - {Key key, - this.variant, - this.color, - this.bold, - this.regular, - this.medium, - this.allowExpand = true, - this.italic: false, - this.textAlign, - this.maxLength = 60, - this.maxLines, - this.readMore = false, - this.style, - this.textDecoration, this.fontSize, this.fontWeight}) - : super(key: key); - - @override - _TextsState createState() => _TextsState(); -} - -class _TextsState extends State { - bool hidden = false; - String text = ""; - - @override - void didUpdateWidget(Texts oldWidget) { - setState(() { - if (widget.style == "overline") - text = widget.text.toUpperCase(); - else { - text = widget.text; - } - }); - super.didUpdateWidget(oldWidget); - } - - @override - void initState() { - hidden = widget.readMore; - if (widget.style == "overline") - text = widget.text.toUpperCase(); - else { - text = widget.text; - } - super.initState(); - } - - double _getFontSize() { - switch (widget.variant) { - case "heading0": - return 40.0; - case "heading": - return 32.0; - case "heading2": - return 28.0; - case "heading3": - return 18.0; - case "body1": - return 18.0; - case "body2": - return 20.0; - case "body2Link": - return 16.0; - case "caption": - return 16.0; - case "caption2": - return 14.0; - case "bodyText": - return 15.0; - case "bodyText2": - return 17.0; - case "caption3": - return 12.0; - case "caption4": - return 9.0; - case "overline": - return 11.0; - case "date": - return 24.0; - default: - return 16.0; - } - } - - FontWeight _getFontWeight() { - if (widget.bold ?? false) { - return FontWeight.w900; - } else if (widget.regular ?? false) { - return FontWeight.w500; - } else if (widget.medium ?? false) { - return FontWeight.w800; - } else { - if (widget.style == null) { - switch (widget.variant) { - case "heading": - return FontWeight.w900; - case "heading2": - return FontWeight.w900; - case "heading3": - return FontWeight.w900; - case "body1": - return FontWeight.w800; - case "body2": - return FontWeight.w900; - case "body2Link": - return FontWeight.w800; - case "caption": - return FontWeight.w700; - case "caption2": - return FontWeight.w700; - case "bodyText": - return FontWeight.w500; - case "bodyText2": - return FontWeight.w500; - case "caption3": - return FontWeight.w600; - case "caption4": - return FontWeight.w600; - case "overline": - return FontWeight.w800; - case "date": - return FontWeight.w900; - default: - return FontWeight.w500; - } - } else { - return null; - } - } - } - - @override - Widget build(BuildContext context) { - TextStyle _getFontStyle() { - switch (widget.style) { - case "headline2": - return Theme.of(context).textTheme.headline2; - case "headline3": - return Theme.of(context).textTheme.headline3; - case "headline4": - return Theme.of(context).textTheme.headline4; - case "headline5": - return Theme.of(context).textTheme.headline5; - case "headline6": - return Theme.of(context).textTheme.headline6; - case "bodyText2": - return Theme.of(context).textTheme.bodyText2; - case "bodyText_15": - return Theme.of(context).textTheme.bodyText2.copyWith(fontSize: 15.0); - case "bodyText1": - return Theme.of(context).textTheme.bodyText1; - case "caption": - return Theme.of(context).textTheme.caption; - case "overline": - return Theme.of(context).textTheme.overline; - case "button": - return Theme.of(context).textTheme.button; - default: - return TextStyle(); - } - } - - return Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Stack( - children: [ - Text( - !hidden - ? text - : (text.substring( - 0, - text.length > widget.maxLength - ? widget.maxLength - : text.length)), - textAlign: widget.textAlign, - overflow: widget.maxLines != null - ? ((widget.maxLines > 1) - ? TextOverflow.fade - : TextOverflow.ellipsis) - : null, - maxLines: widget.maxLines ?? null, - style: widget.style != null - ? _getFontStyle().copyWith( - fontStyle: widget.italic ? FontStyle.italic : null, - color: widget.color != null ? widget.color : null, - fontWeight: widget.fontWeight ?? _getFontWeight(), - ) - : TextStyle( - fontStyle: widget.italic ? FontStyle.italic : null, - color: - widget.color != null ? widget.color : Colors.black, - fontSize:widget.fontSize?? _getFontSize(), - letterSpacing: - widget.variant == "overline" ? 1.5 : null, - fontWeight: widget.fontWeight ?? _getFontWeight(), - fontFamily: 'Poppins', - decoration: - widget.textDecoration //TextDecoration.lineThrough - )), - if (widget.readMore && text.length > widget.maxLength && hidden) - Positioned( - bottom: 0, - left: 0, - right: 0, - child: Container( - decoration: BoxDecoration( - gradient: LinearGradient(colors: [ - Theme.of(context).backgroundColor, - Theme.of(context).backgroundColor.withOpacity(0), - ], begin: Alignment.bottomCenter, end: Alignment.topCenter)), - height: 30, - ), - ) - ], - ), - if (widget.allowExpand && - widget.readMore && - text.length > widget.maxLength) - Padding( - padding: EdgeInsets.only(top: 8.0, right: 8.0, bottom: 8.0), - child: InkWell( - onTap: () { - setState(() { - hidden = !hidden; - }); - }, - child: Text(hidden ? "Read More" : "Read less", - style: _getFontStyle().copyWith( - color: HexColor('#FF0000'), - fontWeight: FontWeight.w800, - fontFamily: "Poppins", - )), - ), - ), - ], - ); - } -} diff --git a/lib/widgets/shared/app_button.dart b/lib/widgets/shared/app_button.dart deleted file mode 100644 index 3f9c4549..00000000 --- a/lib/widgets/shared/app_button.dart +++ /dev/null @@ -1,150 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; - -class Button extends StatefulWidget { - final String title; - final Widget icon; - final VoidCallback onTap; - final bool loading; - final Color color; - - Button({ - Key key, - this.title = "", - this.icon, - this.onTap, - this.loading= false, - this.color, - }) : super(key: key); - - - - @override - _ButtonState createState() => _ButtonState(); -} - -class _ButtonState extends State