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/landing_page.dart b/lib/landing_page.dart index 53da4477..4f4bad85 100644 --- a/lib/landing_page.dart +++ b/lib/landing_page.dart @@ -1,18 +1,13 @@ import 'package:doctor_app_flutter/screens/QR_reader_screen.dart'; import 'package:doctor_app_flutter/screens/home/home_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/doctor_reply_screen.dart'; -import 'package:doctor_app_flutter/screens/doctor/message_screen.dart'; import 'package:doctor_app_flutter/screens/doctor/my_schedule_screen.dart'; -import 'package:doctor_app_flutter/screens/doctor/services_screen.dart'; -import 'package:doctor_app_flutter/screens/prescription/prescription_screen.dart'; import 'package:doctor_app_flutter/widgets/shared/app_drawer_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/bottom_nav_bar.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/app_showcase_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; - import 'icons_app/doctor_app_icons.dart'; class LandingPage extends StatefulWidget { diff --git a/lib/routes.dart b/lib/routes.dart index 502b3be6..b18e181d 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -4,94 +4,43 @@ import 'package:doctor_app_flutter/screens/patients/ECGPage.dart'; import 'package:doctor_app_flutter/screens/patients/insurance_approval_screen_patient.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-detail-screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/UCAF/UCAF-input-screen.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/insurance_approvals_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/lab_result/labs_home_page.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/patient_orders_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/progress_note_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_home_page.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/refer_patient_screen.dart'; - import 'package:doctor_app_flutter/screens/patients/profile/prescriptions/in_patient_prescription_details_screen.dart'; import 'package:doctor_app_flutter/screens/patients/profile/soap_update/update_soap_index.dart'; -import 'package:doctor_app_flutter/screens/prescription/prescription_screen_history.dart'; import 'package:doctor_app_flutter/screens/prescription/prescriptions_page.dart'; import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart'; import 'package:doctor_app_flutter/screens/sick-leave/show-sickleave.dart'; -import 'package:doctor_app_flutter/screens/sick-leave/sick_leave.dart'; import 'package:doctor_app_flutter/screens/procedures/procedure_screen.dart'; - -import './screens/QR_reader_screen.dart'; -import './screens/auth/change_password_screen.dart'; import './screens/auth/login_screen.dart'; import './screens/auth/verification_methods_screen.dart'; -import './screens/auth/verify_account_screen.dart'; -import './screens/blood_bank_screen.dart'; -import './screens/doctor/message_screen.dart'; -import './screens/doctor/my_schedule_screen.dart'; -import './screens/doctor/services_screen.dart'; -import './screens/medicine/medicine_search_screen.dart'; -import './screens/medicine/pharmacies_list_screen.dart'; -import './screens/patients/patient_search_screen.dart'; -import './screens/patients/patients_referred_screen.dart'; import './screens/patients/patients_screen.dart'; -import './screens/patients/profile/insurance_approvals_screen.dart'; -import './screens/patients/profile/lab_result/lab_orders_screen.dart'; -import './screens/patients/profile/patient_orders_screen.dart'; import './screens/patients/profile/patient_profile_screen.dart'; -import './screens/patients/profile/prescriptions/prescriptions_screen.dart'; import './screens/patients/profile/progress_note_screen.dart'; -import './screens/patients/profile/radiology/radiology_screen.dart'; import './screens/patients/profile/vital_sign/vital_sign_details_screen.dart'; -import './screens/patients/profile/vital_sign/vital_sign_item_details_screen.dart'; -import './screens/profile_screen.dart'; -import './screens/settings/settings_screen.dart'; import 'landing_page.dart'; -import 'screens/doctor/doctor_reply_screen.dart'; -import 'screens/live_care/panding_list.dart'; -import 'screens/patients/profile/admission-request/admission-request-detail-screen.dart'; import 'screens/patients/profile/admission-request/admission-request-first-screen.dart'; import 'screens/patients/profile/admission-request/admission-request-third-screen.dart'; import 'screens/patients/profile/admission-request/admission-request_second-screen.dart'; import 'screens/patients/profile/referral/my-referral-detail-screen.dart'; import 'screens/patients/profile/referral/refer-patient-screen.dart'; -import 'screens/prescription/prescription_screen.dart'; -import 'screens/patients/profile/vital_sign/vital-signs-screen.dart'; const String INIT_ROUTE = ROOT; const String ROOT = 'root'; const String HOME = '/'; const String LOGIN = 'login'; -const String PROFILE = 'profile'; -const String CHANGE_PASSWORD = 'change-password'; -const String VERIFY_ACCOUNT = 'verify-account'; const String VERIFICATION_METHODS = 'verification-methods'; -const String MY_SCHEDULE = 'my-schedule'; -const String QR_READER = 'qr-reader'; -const String PATIENT_SEARCH = 'patients/patient-search'; const String PATIENTS = 'patients/patients'; const String PATIENTS_PROFILE = 'patients/patients-profile'; -const String PATIENTS_REFERRED = 'patients/patients-referred'; -const String BLOOD_BANK = 'blood-bank'; -const String DOCTOR_REPLY = 'doctor-reply'; -const String MEDICINE_SEARCH = 'medicine/medicine-search'; -const String PHARMACIES_LIST = 'medicine/pharmacies-list'; -const String MESSAGES = 'messages'; -const String SERVICES = 'services'; -const String SETTINGS = 'settings'; -const String VITAL_SIGN = 'patients/vital-sign'; -const String LAB_ORDERS = 'patients/lab_orders'; const String LAB_RESULT = 'patients/lab_result'; -const String PRESCRIPTIONS = 'patients/prescription'; const String MEDICAL_FILE = 'patients/radiology'; const String PROGRESS_NOTE = 'patients/progress-note'; -const String REFER_PATIENT = 'patients/refer-patient'; const String MY_REFERRAL_DETAIL = 'my_referral_detail'; const String REFER_PATIENT_TO_DOCTOR = 'patients/refer-to-doctor'; -const String PATIENT_ORDERS = 'patients/patient_orders'; -const String PATIENT_INSURANCE_APPROVALS = 'patients/patient_insurance_approvals'; -const String PATIENT_INSURANCE_APPROVALS_NEW = 'patients/patient_insurance_approvals_new'; +const String PATIENT_INSURANCE_APPROVALS_NEW = + 'patients/patient_insurance_approvals_new'; const String VITAL_SIGN_DETAILS = 'patients/vital-sign-details'; -const String PATIENT_VITAL_SIGN = 'patients/vital-sign-data'; const String CREATE_EPISODE = 'patients/create-episode'; const String UPDATE_EPISODE = 'patients/update-episode'; const String PATIENT_ADMISSION_REQUEST = 'patients/admission-request'; @@ -100,83 +49,41 @@ const String PATIENT_ADMISSION_REQUEST_3 = 'patients/admission-request-third'; const String PATIENT_UCAF_REQUEST = 'patients/ucaf'; const String PATIENT_UCAF_DETAIL = 'patients/ucaf/detail'; const String PATIENT_ECG = 'patients/ecg'; - -const String BODY_MEASUREMENTS = 'patients/body-measurements'; const String IN_PATIENT_PRESCRIPTIONS_DETAILS = 'patients/prescription-details'; -// const String VIDEO_CALL = 'video-call'; -const String LIVECARE_PENDING_LIST = 'livecare-pendinglist'; -const String ORDER_PRESCRIPTION = 'prescription/prescriptionsss'; const String ORDER_PRESCRIPTION_NEW = 'prescription/prescription_new'; -const String ORDER_PRESCRIPTION_HISTORY = 'prescription/prescriptionsssH'; const String ORDER_PROCEDURE = 'procedure/procedure'; -// const String LIVECARE_END_DIALOG = 'video-call/EndCallDialogBox'; -const String PATIENT_SICKLEAVE = 'patients/patient_sickleave'; const String ADD_SICKLEAVE = 'add-sickleave'; const String SHOW_SICKLEAVE = 'show-sickleave'; -const String RADIOLOGY = 'radiology'; const String RADIOLOGY_PATIENT = 'radiology-patient'; //todo: change the routing way. var routes = { ROOT: (_) => RootPage(), HOME: (_) => LandingPage(), LOGIN: (_) => Loginsreen(), - PROFILE: (_) => ProfileScreen(), - MY_SCHEDULE: (_) => MyScheduleScreen(), - PATIENT_SEARCH: (_) => PatientSearchScreen(), - PATIENTS_REFERRED: (_) => PatientReferredScreen(), PATIENTS: (_) => PatientsScreen(), - QR_READER: (_) => QrReaderScreen(), - BLOOD_BANK: (_) => BloodBankScreen(), - DOCTOR_REPLY: (_) => DoctorReplyScreen(), - MEDICINE_SEARCH: (_) => MedicineSearchScreen(), - SETTINGS: (_) => SettingsScreen(), - CHANGE_PASSWORD: (_) => ChangePasswordScreen(), - VERIFY_ACCOUNT: (_) => VerifyAccountScreen(), VERIFICATION_METHODS: (_) => VerificationMethodsScreen(), PATIENTS_PROFILE: (_) => PatientProfileScreen(), - PHARMACIES_LIST: (_) => PharmaciesListScreen( - itemID: null, - ), - MESSAGES: (_) => MessagesScreen(), - SERVICES: (_) => ServicesScreen(), - LAB_ORDERS: (_) => LabOrdersScreen(), LAB_RESULT: (_) => LabsHomePage(), - PRESCRIPTIONS: (_) => PrescriptionScreen(), MEDICAL_FILE: (_) => MedicalFilePage(), PROGRESS_NOTE: (_) => ProgressNoteScreen(), - REFER_PATIENT: (_) => ReferPatientScreen(), REFER_PATIENT_TO_DOCTOR: (_) => PatientMakeReferralScreen(), - PATIENT_ORDERS: (_) => PatientsOrdersScreen(), - PATIENT_INSURANCE_APPROVALS: (_) => InsuranceApprovalsScreen(), PATIENT_INSURANCE_APPROVALS_NEW: (_) => InsuranceApprovalScreenNew(), VITAL_SIGN_DETAILS: (_) => VitalSignDetailsScreen(), - PATIENT_VITAL_SIGN: (_) => PatientVitalSignScreen(), - RADIOLOGY: (_) => RadiologyScreen(), RADIOLOGY_PATIENT: (_) => RadiologyHomePage(), PATIENT_ADMISSION_REQUEST: (_) => AdmissionRequestFirstScreen(), PATIENT_ADMISSION_REQUEST_2: (_) => AdmissionRequestSecondScreen(), PATIENT_ADMISSION_REQUEST_3: (_) => AdmissionRequestThirdScreen(), - // PATIENT_ADMISSION_REQUEST: (_) => AdmissionRequestDetailScreen(), CREATE_EPISODE: (_) => UpdateSoapIndex( isUpdate: true, ), UPDATE_EPISODE: (_) => UpdateSoapIndex( isUpdate: true, ), - BODY_MEASUREMENTS: (_) => VitalSignItemDetailsScreen(), IN_PATIENT_PRESCRIPTIONS_DETAILS: (_) => InpatientPrescriptionDetailsScreen(), - // VIDEO_CALL: (_) => VideoCallPage(patientData: null), - LIVECARE_PENDING_LIST: (_) => LiveCarePandingListScreen(), - // LIVECARE_END_DIALOG: (_) => EndCallDialogBox(), - PATIENT_SICKLEAVE: (_) => SickLeaveScreen(), ADD_SICKLEAVE: (_) => AddSickLeavScreen(), SHOW_SICKLEAVE: (_) => ShowSickLeaveScreen(), - ORDER_PRESCRIPTION: (_) => NewPrescriptionScreen(), ORDER_PRESCRIPTION_NEW: (_) => PrescriptionsPage(), - ORDER_PRESCRIPTION_HISTORY: (_) => NewPrescriptionHistoryScreen(), ORDER_PROCEDURE: (_) => ProcedureScreen(), - - // LIVECARE_END_DIALOG: (_) => EndCallDialogBox() MY_REFERRAL_DETAIL: (_) => MyReferralDetailScreen(), PATIENT_UCAF_REQUEST: (_) => UCAFInputScreen(), PATIENT_UCAF_DETAIL: (_) => UcafDetailScreen(), 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/auth/verify_account_screen.dart b/lib/screens/auth/verify_account_screen.dart deleted file mode 100644 index e69d973e..00000000 --- a/lib/screens/auth/verify_account_screen.dart +++ /dev/null @@ -1,49 +0,0 @@ -import 'package:flutter/material.dart'; - -import '../../lookups/auth_lookup.dart'; -import '../../widgets/auth/auth_header.dart'; -import '../../widgets/auth/verfiy_account.dart'; -import '../../widgets/shared/app_scaffold_widget.dart'; - -class VerifyAccountScreen extends StatefulWidget { - @override - _VerifyAccountScreenState createState() => _VerifyAccountScreenState(); -} - -class _VerifyAccountScreenState extends State { - bool _isLoading = false; - - /* - *@author: Elham Rababah - *@Date:19/4/2020 - *@param: isLoading - *@return: - *@desc: Change Isloading attribute in order to show or hide loader - */ - void changeLoadingStata(isLoading) { - setState(() { - _isLoading = isLoading; - }); - } - - @override - Widget build(BuildContext context) { - return AppScaffold( - isLoading: _isLoading, - isShowAppBar: false, - body: SafeArea( - child: ListView(children: [ - Container( - margin: EdgeInsetsDirectional.fromSTEB(30, 0, 30, 0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AuthHeader(loginType.verifyPassword), - VerifyAccount(changeLoadingStata: changeLoadingStata), - ], - ), - ), - ]), - )); - } -} diff --git a/lib/screens/blood_bank_screen.dart b/lib/screens/blood_bank_screen.dart deleted file mode 100644 index 767be58f..00000000 --- a/lib/screens/blood_bank_screen.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:flutter/material.dart'; -class BloodBankScreen - - extends StatelessWidget { - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar(title: Text("Blood Bank"),), - ); - } -} \ No newline at end of file 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/doctor/message_screen.dart b/lib/screens/doctor/message_screen.dart deleted file mode 100644 index 17d57c47..00000000 --- a/lib/screens/doctor/message_screen.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:flutter/material.dart'; - -class MessagesScreen extends StatelessWidget { - @override - Widget build(BuildContext context) { - return AppScaffold( - isShowAppBar: false, - body: Center( - child: Text('Messages heeer'), - ), - ); - } -} diff --git a/lib/screens/doctor/services_screen.dart b/lib/screens/doctor/services_screen.dart deleted file mode 100644 index d470cc87..00000000 --- a/lib/screens/doctor/services_screen.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:flutter/material.dart'; - -class ServicesScreen extends StatelessWidget { - @override - Widget build(BuildContext context) { - return AppScaffold( - isShowAppBar: false, - body: Center( - child: Text('Services heeer'), - ), - ); - } -} \ No newline at end of file diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index 1bfc0ea3..c9f89cb8 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -24,7 +24,7 @@ import 'package:doctor_app_flutter/widgets/dashboard/out_patient_stack.dart'; import 'package:doctor_app_flutter/widgets/dashboard/row_count.dart'; import 'package:doctor_app_flutter/widgets/dashboard/swiper_rounded_pagination.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'; 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..890dea15 100644 --- a/lib/screens/medical-file/medical_file_details.dart +++ b/lib/screens/medical-file/medical_file_details.dart @@ -1,16 +1,12 @@ import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/screens/patients/profile/patient_profile_screen.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/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'; @@ -100,7 +96,11 @@ class _MedicalFileDetailsState extends State { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return BaseView( - onModelReady: (model) => model.getMedicalFile(mrn: pp), + onModelReady: (model) async { + if (model.medicalFileList.length == 0) { + model.getMedicalFile(mrn: pp); + } + }, builder: (BuildContext context, MedicalFileViewModel model, Widget child) => AppScaffold( @@ -128,8 +128,6 @@ class _MedicalFileDetailsState extends State { child: Container( child: Column( children: [ - // PatientProfileHeaderNewDesign(patient, - // patient.patientType.toString(), patient.arrivedOn), model.medicalFileList.length != 0 && model .medicalFileList[0] @@ -144,161 +142,6 @@ class _MedicalFileDetailsState extends State { child: Container( child: Column( children: [ - // Container( - // width: double.infinity, - // margin: EdgeInsets.only( - // top: 10, left: 10, right: 10), - // padding: EdgeInsets.all(8.0), - // decoration: BoxDecoration( - // color: Colors.white, - // borderRadius: BorderRadius.all( - // Radius.circular(10.0), - // ), - // border: Border.all( - // color: Colors.grey[200], width: 0.5), - // ), - // child: Column( - // children: [ - // Row( - // children: [ - // if (model.medicalFileList.length != - // 0 && - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[ - // encounterNumber] - // .timeLineEvents[0] - // .consulations - // .length != - // 0) - // Expanded( - // child: AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[ - // encounterNumber] - // .timeLineEvents[0] - // .consulations[0] - // .doctorName - // .toUpperCase(), - // fontWeight: FontWeight.w700, - // ), - // ), - // ], - // ), - // if (model.medicalFileList.length != 0) - // Row( - // children: [ - // AppText( - // TranslationBase.of(context) - // .clinic + - // ": ", - // ), - // if (model.medicalFileList - // .length != - // 0 && - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[ - // encounterNumber] - // .timeLineEvents[0] - // .consulations - // .length != - // 0) - // AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[ - // encounterNumber] - // .timeLineEvents[0] - // .consulations[0] - // .clinicName, - // fontWeight: FontWeight.w700, - // ), - // ], - // ), - // Row( - // children: [ - // AppText( - // TranslationBase.of(context) - // .episode + - // ": ", - // //fontWeight: FontWeight.w700, - // ), - // if (model.medicalFileList.length != - // 0 && - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[ - // encounterNumber] - // .timeLineEvents[0] - // .consulations - // .length != - // 0) - // AppText( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[encounterNumber] - // .timeLineEvents[0] - // .consulations[0] - // .episodeID - // .toString(), - // fontWeight: FontWeight.w700, - // ), - // ], - // ), - // Row( - // children: [ - // AppText( - // TranslationBase.of(context) - // .visitDate + - // ": ", - // //fontWeight: FontWeight.w700, - // ), - // if (model.medicalFileList.length != - // 0 && - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[ - // encounterNumber] - // .timeLineEvents[0] - // .consulations - // .length != - // 0) - // AppText( - // '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat( - // model - // .medicalFileList[0] - // .entityList[0] - // .timelines[ - // encounterNumber] - // .date, - // ), isArabic: projectViewModel.isArabic)}', - // color: Colors.black, - // fontWeight: FontWeight.w700, - // fontSize: 14, - // ), - // SizedBox(width: 35.0), - // // AppText( - // // 'Appt Date : ', - // // fontWeight: FontWeight.w700, - // // ), - // // AppText( - // // '23/12/2020', - // // ), - // ], - // ), - // ], - // ), - // ), - SizedBox(height: 25.0), if (model.medicalFileList.length != 0 && model @@ -332,7 +175,7 @@ class _MedicalFileDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( TranslationBase.of( context) .historyOfPresentIllness @@ -454,7 +297,7 @@ class _MedicalFileDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( TranslationBase.of( context) .assessment @@ -655,14 +498,7 @@ class _MedicalFileDetailsState extends State { ), ), ), - // SizedBox( - // height: 30, - // ), - // Container( - // width: double.infinity, - // height: 1, - // color: Color(0xffCCCCCC), - // ), + SizedBox( height: 30, ), @@ -698,7 +534,7 @@ class _MedicalFileDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( TranslationBase.of( context) .test @@ -889,14 +725,7 @@ class _MedicalFileDetailsState extends State { ), ), ), - // SizedBox( - // height: 30, - // ), - // Container( - // width: double.infinity, - // height: 1, - // color: Color(0xffCCCCCC), - // ), + SizedBox( height: 30, ), @@ -932,7 +761,7 @@ class _MedicalFileDetailsState extends State { children: [ Row( children: [ - Texts( + AppText( TranslationBase.of( context) .physicalSystemExamination @@ -1086,11 +915,6 @@ class _MedicalFileDetailsState extends State { SizedBox( height: 30, ), - // Container( - // width: double.infinity, - // height: 1, - // color: Color(0xffCCCCCC), - // ), ], ), ), @@ -1105,7 +929,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..1ebb0249 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -1,25 +1,16 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/screens/medical-file/medical_file_details.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/patient_profile_screen.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/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/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'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; class MedicalFilePage extends StatefulWidget { @override @@ -49,13 +40,7 @@ class _MedicalFilePageState extends State { child: SingleChildScrollView( child: Container( child: Column( - // mainAxisAlignment: model.medicalFileList.length != 0 && - // model.medicalFileList != null - // ? MainAxisAlignment.start - // : MainAxisAlignment.center, children: [ - // PatientProfileHeaderNewDesign( - // patient, patient.patientType.toString(), arrivalType), Padding( padding: EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0), @@ -186,7 +171,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_referred_screen.dart b/lib/screens/patients/patients_referred_screen.dart deleted file mode 100644 index df1427c2..00000000 --- a/lib/screens/patients/patients_referred_screen.dart +++ /dev/null @@ -1,103 +0,0 @@ -/* - *@author: Amjad Amireh Modified Referred Patients - *@Date:27/5/2020 - - - *@desc: - */ - -import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/expandable_item_widget.dart'; -import 'package:flutter/material.dart'; - -class PatientReferredScreen extends StatefulWidget { - PatientReferredScreen({Key key}) : super(key: key); - - @override - _PatientReferredScreenState createState() => _PatientReferredScreenState(); -} - -class _PatientReferredScreenState extends State { - - String patientType; - String patientTypetitle; - - List>list_product; - @override - void initState() { - super.initState(); - list_product=new List(); - for(var k=1;k<=5;k++) - { - Map map=Map(); - map.putIfAbsent(getName(k), ()=>getContent()); - list_product.add(map); - - } - list_product.map((s){ - - }).map((list)=>list).toList();} - - - - @override - Widget build(BuildContext context) { - - Listlist=List(); - - return AppScaffold( - //TODO : add Translation - appBarTitle: "My Referred Patients",//patientTypetitle, - body: Center( - - child: ListView( - children: [ - for(final map in list_product) - for(final keys in map.keys) - ExpandableItem(keys,map[keys].toList()) - , - ], - ) - ), - - ); - } - - - String getName(int month) - { - switch(month) - { - case 1: - return "Mahmoud Shrouf"; - case 2: - return "Mahmoud Shrouf"; - case 3: - return "Mahmoud Shrouf"; - case 4: - return "Mahmoud Shrouf"; - case 5: - return "Mahmoud Shrouf"; - case 6: - return "Mahmoud Shrouf"; - case 7: - return "Mahmoud Shrouf"; - case 8: - return "Mahmoud Shrouf"; - case 9: - return "Mahmoud Shrouf"; - case 10: - return "Mahmoud Shrouf"; - case 11: - return "Mahmoud Shrouf"; - case 12: - return "Mahmoud Shrouf"; - } - } - - List getContent() - { - - return ["1","2","3","4","5","6"].toList(); - } -} \ No newline at end of file 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/insurance_approvals_screen.dart b/lib/screens/patients/profile/insurance_approvals_screen.dart deleted file mode 100644 index 9105338b..00000000 --- a/lib/screens/patients/profile/insurance_approvals_screen.dart +++ /dev/null @@ -1,493 +0,0 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; -import 'package:doctor_app_flutter/models/patient/insurance_aprovals_request.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/errors/dr_app_embedded_error.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; -import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; - -import '../../../config/shared_pref_kay.dart'; -import '../../../config/size_config.dart'; -import '../../../models/patient/patiant_info_model.dart'; -import '../../../util/dr_app_shared_pref.dart'; -import '../../../widgets/shared/app_scaffold_widget.dart'; -import '../../../widgets/shared/app_texts_widget.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: ibrahim albitar - *@Date:21/5/2020 - *@param: - *@return: - *@desc: - */ - -class InsuranceApprovalsScreen extends StatefulWidget { - @override - _InsuranceApprovalsState createState() => _InsuranceApprovalsState(); -} - -class _InsuranceApprovalsState extends State { - var approvalsList; - var filteredApprovalsList; - final _controller = TextEditingController(); - - /* - *@author: ibrahim al bitar - *@Date:21/5/2020 - *@param: - *@return: - *@desc: - */ - getInsuranceApprovalsList( - BuildContext context, PatientViewModel model) async { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - String token = await sharedPref.getString(TOKEN); - String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); - - print(type); - InsuranceAprovalsRequest insuranceApprovalsRequest = - InsuranceAprovalsRequest( - patientID: patient.patientId, - projectID: patient.projectId, - tokenID: token, - patientTypeID: patient.patientType, - languageID: 2); - model - .getPatientInsuranceApprovals(insuranceApprovalsRequest.toJson()).then((c){ - approvalsList = model.insuranceApporvalsList; - }); - } - - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => getInsuranceApprovalsList(context, model), - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase - .of(context) - .insuranceApprovals, - body: model.insuranceApporvalsList == null || - model.insuranceApporvalsList.length == 0 - ? DrAppEmbeddedError( - error: - TranslationBase - .of(context) - .errorNoInsuranceApprovals) - : Column( - children: [ - Container( - margin: EdgeInsets.all(10), - width: SizeConfig.screenWidth * 0.80, - child: TextField( - controller: _controller, - onChanged: (String str) { - this.searchData(str, model); - }, - textInputAction: TextInputAction.done, - decoration: buildInputDecoration( - context, - TranslationBase - .of(context) - .searchInsuranceApprovals), - ), - ), - Expanded( - child: Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.realScreenWidth * 0.05, - 0, - SizeConfig.realScreenWidth * 0.05, - 0), - child: ListView.builder( - itemCount: approvalsList.length, - itemBuilder: (BuildContext ctxt, int index) { - return RoundedContainer( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - ExpansionTile( - title: Row( - children: [ - Column( - children: [ - Icon( - approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains("Approved") - ? DoctorApp.approved_icon - : approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains( - "Cancelled") - ? DoctorApp - .reject_icon - : DoctorApp - .pending_icon, - color: approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains("Approved") - ? Colors.green - : approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains( - "Cancelled") - ? Colors.red - : Colors.yellow, - ), - AppText( - approvalsList[index][ - "ApprovalStatusDescption"], - fontSize: SizeConfig - .textMultiplier * - 1.5, - color: approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains("Approved") - ? Colors.green - : approvalsList[index][ - "ApprovalStatusDescption"] - .toString() - .contains( - "Cancelled") - ? Colors.red - : Colors.yellow, - ) - ], - ), - Expanded( - child: Column( - mainAxisAlignment: - MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - approvalsList[index] - ["ClinicName"], - marginTop: 10, - marginLeft: 10, - marginBottom: 5, - fontWeight: FontWeight.bold, - ), - AppText( - approvalsList[index] - ["DoctorName"], - marginLeft: 10, - marginTop: 1, - ), - AppText( - convertDateFormat( - approvalsList[index] - ["ApprovalDate"]), - marginLeft: 10, - marginBottom: 5, - color: Colors.grey[600], - ), - ], - ), - ) - ], - ), - children: [ - Divider( - color: Colors.black, - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - RoundedContainer( - backgroundColor: - Color(PRIMARY_COLOR), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - approvalsList[index] - ["ApprovalNo"] - .toString(), - color: Colors.white, - fontSize: 19, - fontWeight: FontWeight.bold, - marginTop: 10, - marginLeft: 10, - marginRight: 10, - marginBottom: 2, - ), - AppText( - TranslationBase.of(context) - .approvalNo, - color: Colors.white, - fontSize: 16, - marginTop: 2, - marginLeft: 10, - marginBottom: 15, - marginRight: 10, - ), - Row( - children: [ - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of( - context) - .producerName, - fontSize: 10, - color: - Colors.white, - marginLeft: SizeConfig - .widthMultiplier * - 3, - ), - AppText( - checkList(approvalsList[ - index] - [ - "ApporvalDetails"]) - ? approvalsList[ - index] - [ - "ApporvalDetails"][0] - [ - "ProcedureName"] - : "", - fontSize: 12, - fontWeight: - FontWeight - .bold, - marginLeft: SizeConfig - .widthMultiplier * - 3, - marginTop: 3, - color: - Colors.white, - ), - ], - ), - ), - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of( - context) - .status, - fontSize: 10, - color: - Colors.white, - marginLeft: SizeConfig - .widthMultiplier * - 9, - ), - AppText( - approvalsList[ - index][ - "ApprovalStatusDescption"], - fontSize: 12, - fontWeight: - FontWeight - .bold, - marginLeft: SizeConfig - .widthMultiplier * - 9, - marginTop: 3, - color: - Colors.white, - ), - ], - ), - ), - ], - ), - Row( - children: [ - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of( - context) - .receiptOn, - fontSize: 10, - color: - Colors.white, - marginLeft: SizeConfig - .widthMultiplier * - 3, - marginTop: SizeConfig - .heightMultiplier * - 1.5, - ), - AppText( - convertDateFormat( - approvalsList[ - index] - [ - "ReceiptOn"]), - fontSize: 12, - fontWeight: - FontWeight - .bold, - marginLeft: SizeConfig - .widthMultiplier * - 3, - marginTop: 3, - marginBottom: - SizeConfig - .heightMultiplier * - 2, - color: - Colors.white, - ), - ], - ), - ), - Expanded( - flex: 1, - child: Column( - crossAxisAlignment: - CrossAxisAlignment - .start, - children: [ - AppText( - TranslationBase.of( - context) - .expiryDate, - fontSize: 10, - color: - Colors.white, - marginTop: SizeConfig - .heightMultiplier * - 1.5, - marginLeft: SizeConfig - .widthMultiplier * - 9, - ), - AppText( - convertDateFormat( - approvalsList[ - index] - [ - "ExpiryDate"]), - fontSize: 12, - fontWeight: - FontWeight - .bold, - marginLeft: SizeConfig - .widthMultiplier * - 9, - marginTop: 3, - marginBottom: - SizeConfig - .heightMultiplier * - 2, - color: - Colors.white, - ), - ], - ), - ), - ], - ), - ], - )), - ], - ), - ], - )); - }), - ), - ), - ], - ), - ),); - } - - InputDecoration buildInputDecoration(BuildContext context, hint) { - return InputDecoration( - prefixIcon: Icon(Icons.search, color: Colors.black), - filled: true, - fillColor: Colors.white, - hintText: hint, - hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: HexColor('#CCCCCC')), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Colors.grey), //), - )); - } - - searchData(String str, PatientViewModel model) { - var strExist = str.length > 0 ? true : false; - - if (strExist) { - filteredApprovalsList = null; - filteredApprovalsList = approvalsList - .where((note) => - note["ClinicName"].toString().contains(str.toUpperCase())) - .toList(); - setState(() { - approvalsList = filteredApprovalsList; - }); - } else { - setState(() { - approvalsList = model.insuranceApporvalsList; - }); - } - } - - convertDateFormat(String str) { - if (str == null) return ''; - const start = "/Date("; - const end = "+0300)"; - - final startIndex = str.indexOf(start); - final endIndex = str.indexOf(end, startIndex + start.length); - - var date = new DateTime.fromMillisecondsSinceEpoch( - int.parse(str.substring(startIndex + start.length, endIndex))); - String newDate = date.year.toString() + - "-" + - date.month.toString().padLeft(2, '0') + - "-" + - date.day.toString().padLeft(2, '0'); - - return newDate.toString(); - } - - bool checkList(List list) { - return list.length > 0 ? true : false; - } -} 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_orders_screen.dart b/lib/screens/patients/profile/lab_result/lab_orders_screen.dart deleted file mode 100644 index 119d7666..00000000 --- a/lib/screens/patients/profile/lab_result/lab_orders_screen.dart +++ /dev/null @@ -1,263 +0,0 @@ -import 'package:doctor_app_flutter/core/viewModel/patient_view_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/helpers.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/shared/errors/dr_app_embedded_error.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; -import 'package:flutter/material.dart'; - -import '../../../../config/shared_pref_kay.dart'; -import '../../../../config/size_config.dart'; -import '../../../../models/patient/lab_orders/lab_orders_req_model.dart'; -import '../../../../models/patient/patiant_info_model.dart'; -import '../../../../util/dr_app_shared_pref.dart'; -import '../../../../widgets/shared/app_scaffold_widget.dart'; -import '../../../../widgets/shared/app_texts_widget.dart'; -import 'lab_result_secreen.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: Elham Rababah - *@Date:26/4/2020 - *@param: - *@return:LabOrdersScreen - *@desc: LabOrdersScreen class - */ - -class LabOrdersScreen extends StatefulWidget { - @override - _LabOrdersScreenState createState() => _LabOrdersScreenState(); -} - -class _LabOrdersScreenState extends State { - - - /* - *@author: Elham Rababah - *@Date:28/4/2020 - *@param: context - *@return: - *@desc: getLabResultOrders Function - */ - getLabResultOrders(BuildContext context, PatientViewModel model) async { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - String token = await sharedPref.getString(TOKEN); - LabOrdersReqModel labOrdersReqModel = LabOrdersReqModel( - patientID: patient.patientId, - projectID: patient.projectId, - tokenID: token, - patientTypeID: patient.patientType??1, - languageID: 2); - - model.getLabResultOrders(labOrdersReqModel.toJson()); - } - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => getLabResultOrders(context, model), - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase - .of(context) - .labOrders, - body: model.patientLabResultOrdersList.length == 0 - ? DrAppEmbeddedError( - error: TranslationBase - .of(context) - .errorNoLabOrders) - : Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.realScreenWidth * 0.05, - 0, - SizeConfig.realScreenWidth * 0.05, - 0), - child: Container( - margin: EdgeInsets.symmetric(vertical: 10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(20.0), - ), - ), - child: ListView.builder( - itemCount: - model.patientLabResultOrdersList.length, - itemBuilder: (BuildContext context, int index) { - return InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - LabResult( - labOrders: model - .patientLabResultOrdersList[index], - ), - ), - ); - }, - child: Container( - padding: EdgeInsets.all(10), - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(10)), - border: Border( - bottom: BorderSide( - color: Colors.grey, width: 0.5), - top: BorderSide( - color: Colors.grey, width: 0.5), - left: BorderSide( - color: Colors.grey, width: 0.5), - right: BorderSide( - color: Colors.grey, width: 0.5), - ), - ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - LargeAvatar( - url: model - .patientLabResultOrdersList[ - index] - .doctorImageURL, - name: model - .patientLabResultOrdersList[ - index] - .doctorName, - ), - Expanded( - child: Padding( - padding: - const EdgeInsets.fromLTRB( - 8, 0, 0, 0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - if(model - .patientLabResultOrdersList[index] - .doctorName != null ) - AppText( - '${model - .patientLabResultOrdersList[index] - .doctorName}', - fontSize: 1.7 * - SizeConfig - .textMultiplier, - fontWeight: FontWeight.w600, - ), - SizedBox( - height: 8, - ), - AppText( - ' ${model - .patientLabResultOrdersList[index] - .projectName}', - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Colors.grey[800]), - SizedBox( - height: 8, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).invoiceNo, - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Colors.grey[800], - ), - AppText( - ' ${model - .patientLabResultOrdersList[index] - .invoiceNo}', - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Colors.grey[800], - ), - ], - ),SizedBox( - height: 8, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).orderNo, - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Colors.grey[800], - ), - AppText( - ' ${model - .patientLabResultOrdersList[index] - .orderNo}', - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Colors.grey[800], - ), - ], - ) - ], - ), - ), - ) - ], - ), - SizedBox( - height: 3, - ), - Divider( - color: Colors.grey, - ), - SizedBox( - height: 3, - ), - Row( - children: [ - Icon( - EvaIcons.calendar, - color: Colors.grey[700], - ), - SizedBox( - width: 10, - ), - Expanded( - child: AppText( - '${DateUtils.getDate(model - .patientLabResultOrdersList[index] - .createdOn)}', - fontSize: 2.0 * - SizeConfig.textMultiplier, - ), - ) - ], - ) - ], - ), - ), - ); - }), - ), - ), - ),); - } -} 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_orders_screen.dart b/lib/screens/patients/profile/patient_orders_screen.dart deleted file mode 100644 index a7182546..00000000 --- a/lib/screens/patients/profile/patient_orders_screen.dart +++ /dev/null @@ -1,219 +0,0 @@ -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/progress_note_request.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/errors/dr_app_embedded_error.dart'; -import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; -import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; - -import '../../../config/shared_pref_kay.dart'; -import '../../../config/size_config.dart'; -import '../../../models/patient/patiant_info_model.dart'; -import '../../../util/dr_app_shared_pref.dart'; -import '../../../widgets/shared/app_scaffold_widget.dart'; -import '../../../widgets/shared/app_texts_widget.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: ibrahim albitar - *@Date:21/5/2020 - *@param: - *@return: - *@desc: - */ - -class PatientsOrdersScreen extends StatefulWidget { - @override - _PatientsOrdersState createState() => _PatientsOrdersState(); -} - -class _PatientsOrdersState extends State { - var notesList; - var filteredNotesList; - final _controller = TextEditingController(); - var _isInit = true; - - /* - *@author: ibrahim al bitar - *@Date:21/5/2020 - *@param: - *@return: - *@desc: - */ - getProgressNoteList(BuildContext context, PatientViewModel model ) async { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - String token = await sharedPref.getString(TOKEN); - String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); - - print(type); - ProgressNoteRequest progressNoteRequest = ProgressNoteRequest( - visitType: 3, // if equal 3 then this will return orders - admissionNo: int.parse(patient.admissionNo), - projectID: patient.projectId, - tokenID: token, - patientTypeID: patient.patientType, - languageID: 2); - model.getPatientProgressNote(progressNoteRequest.toJson()).then((c){ - notesList = model.patientProgressNoteList; - }); - } - - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => getProgressNoteList(context, model), - builder: (_, model, w) => AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase.of(context).orders, - body: notesList == null || notesList.length == 0 - ? DrAppEmbeddedError( - error: TranslationBase.of(context).errorNoOrders) - : Column( - children: [ - Container( - margin: EdgeInsets.all(10), - width: SizeConfig.screenWidth * 0.80, - child: TextField( - controller: _controller, - onChanged: (String str) { - this.searchData(str, model); - }, - textInputAction: TextInputAction.done, - decoration: buildInputDecoration(context, - TranslationBase.of(context).searchOrders), - ), - ), - Expanded( - child: Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.realScreenWidth * 0.05, - 0, - SizeConfig.realScreenWidth * 0.05, - 0), - child: ListView.builder( - itemCount: notesList.length, - itemBuilder: (BuildContext ctxt, int index) { - return RoundedContainer( - backgroundColor: Colors.white, - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - ExpansionTile( - title: Container( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - notesList[index] - ["DoctorName"], - marginTop: 10, - marginLeft: 10, - marginBottom: 5, - fontWeight: FontWeight.bold, - ), - AppText( - notesList[index] - ["AdmissionNo"], - marginLeft: 10, - color: Colors.grey[600], - ), - AppText( - convertDateFormat( - notesList[index] - ["AssessmentDate"]), - marginLeft: 10, - color: Colors.grey[600], - ), - ], - ), - ), - children: [ - Divider( - color: Colors.black, - height: 20, - thickness: 1, - indent: 0, - endIndent: 0, - ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - notesList[index]["Notes"], - margin: 5, - ), - ], - ) - ], - ), - ], - )); - }), - ), - ), - ], - ), - ),); - } - - InputDecoration buildInputDecoration(BuildContext context, hint) { - return InputDecoration( - prefixIcon: Icon(Icons.search, color: Colors.black), - filled: true, - fillColor: Colors.white, - hintText: hint, - hintStyle: TextStyle(fontSize: 2 * SizeConfig.textMultiplier), - enabledBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(20)), - borderSide: BorderSide(color: HexColor('#CCCCCC')), - ), - focusedBorder: OutlineInputBorder( - borderRadius: BorderRadius.all(Radius.circular(50.0)), - borderSide: BorderSide(color: Colors.grey), //), - )); - } - - searchData(String str, PatientViewModel model) { - var strExist = str.length > 0 ? true : false; - - if (strExist) { - filteredNotesList = null; - filteredNotesList = notesList - .where((note) => - note["DoctorName"].toString().contains(str.toUpperCase())) - .toList(); - setState(() { - notesList = filteredNotesList; - }); - } else { - setState(() { - notesList = model.patientProgressNoteList; - }); - } - } - - convertDateFormat(String str) { - const start = "/Date("; - const end = "+0300)"; - - final startIndex = str.indexOf(start); - final endIndex = str.indexOf(end, startIndex + start.length); - - var date = new DateTime.fromMillisecondsSinceEpoch( - int.parse(str.substring(startIndex + start.length, endIndex))); - String newDate = date.year.toString() + - "-" + - date.month.toString().padLeft(2, '0') + - "-" + - date.day.toString().padLeft(2, '0'); - - return newDate.toString(); - } -} 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/prescriptions/prescriptions_screen.dart b/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart deleted file mode 100644 index 496e5478..00000000 --- a/lib/screens/patients/profile/prescriptions/prescriptions_screen.dart +++ /dev/null @@ -1,88 +0,0 @@ -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/reauest_prescription_report_for_in_patient.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/prescription_in_patinets_widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/prescription_out_patinets_widget.dart'; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -import '../../../../config/shared_pref_kay.dart'; -import '../../../../models/patient/patiant_info_model.dart'; -import '../../../../models/patient/prescription/prescription_req_model.dart'; -import '../../../../util/dr_app_shared_pref.dart'; -import '../../../../widgets/shared/app_scaffold_widget.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: Elham Rababah - *@Date:26/4/2020 - *@param: - *@return:PrescriptionScreen - *@desc: PrescriptionScreen class - */ - -class PrescriptionScreen extends StatefulWidget { - @override - _PrescriptionScreenState createState() => _PrescriptionScreenState(); -} - -class _PrescriptionScreenState extends State { - String type = '2'; - - /* - *@author: Elham Rababah - *@Date:28/4/2020 - *@param: context - *@return: - *@desc: getPrescriptionsList Function - */ - getPrescriptionsList(BuildContext context, PatientViewModel model) async { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - String token = await sharedPref.getString(TOKEN); - type = await sharedPref.getString(SLECTED_PATIENT_TYPE); - - if (type == '1') { - RequestPrescriptionReportForInPatient prescriptionReqModel = - RequestPrescriptionReportForInPatient( - patientID: patient.patientId, - patientTypeID: patient.patientType, - admissionNo: int.parse(patient.admissionNo)); - model.getInPatientPrescriptions(prescriptionReqModel.toJson()); - } else { - PrescriptionReqModel prescriptionReqModel = PrescriptionReqModel( - patientID: patient.patientId, - projectID: patient.projectId, - tokenID: token, - patientTypeID: patient.patientType, - languageID: 2, - setupID: 0); - model.getOutPatientPrescriptions(prescriptionReqModel.toJson()); - } - } - - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => getPrescriptionsList(context, model), - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase - .of(context) - .prescription, - body: type == '1' - ? PrescriptionInPatientWidget( - prescriptionReportForInPatientList: - model.prescriptionReportForInPatientList, - ) - : PrescriptionOutPatientWidget( - patientPrescriptionsList: - model.patientPrescriptionsList, - ), - ),); - } -} 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/radiology/radiology_screen.dart b/lib/screens/patients/profile/radiology/radiology_screen.dart deleted file mode 100644 index 0bce886a..00000000 --- a/lib/screens/patients/profile/radiology/radiology_screen.dart +++ /dev/null @@ -1,192 +0,0 @@ -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; -import 'package:doctor_app_flutter/models/patient/radiology/radiology_req_model.dart'; -import 'package:doctor_app_flutter/screens/base/base_view.dart'; -import 'package:doctor_app_flutter/screens/patients/profile/radiology/radiology_report_screen.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/shared/errors/dr_app_embedded_error.dart'; -import 'package:flutter/material.dart'; - -import '../../../../config/shared_pref_kay.dart'; -import '../../../../config/size_config.dart'; -import '../../../../models/patient/patiant_info_model.dart'; -import '../../../../util/dr_app_shared_pref.dart'; -import '../../../../widgets/shared/app_scaffold_widget.dart'; -import '../../../../widgets/shared/app_texts_widget.dart'; - -DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); - -/* - *@author: Elham Rababah - *@Date:26/4/2020 - *@param: - *@return:RadiologyScreen - *@desc: RadiologyScreen class - */ - -class RadiologyScreen extends StatefulWidget { - @override - _RadiologyScreenState createState() => _RadiologyScreenState(); -} - -class _RadiologyScreenState extends State { - - /* - *@author: Elham Rababah - *@Date:28/4/2020 - *@param: context - *@return: - *@desc: getRadiologyList Function - */ - getRadiologyList(context, PatientViewModel model) async { - final routeArgs = ModalRoute.of(context).settings.arguments as Map; - PatiantInformtion patient = routeArgs['patient']; - String token = await sharedPref.getString(TOKEN); - String type = await sharedPref.getString(SLECTED_PATIENT_TYPE); - int inOutpatientType = 1; - if (type == '0') { - inOutpatientType = 2; - } - print(type); - RadiologyReqModel radiologyReqModel = RadiologyReqModel( - patientID: patient.patientId, - projectID: patient.projectId, - tokenID: token, - patientTypeID: patient.patientType, - languageID: 2, - ); - model.getPatientRadiology(radiologyReqModel.toJson()); - } - - - @override - Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => getRadiologyList(context, model), - builder: (_, model, w) => - AppScaffold( - baseViewModel: model, - appBarTitle: TranslationBase - .of(context) - .radiology, - body: - model.patientRadiologyList.length == 0 - ? DrAppEmbeddedError( - error: TranslationBase - .of(context) - .youDoNotHaveAnyItem) - : Container( - margin: EdgeInsets.fromLTRB( - SizeConfig.realScreenWidth * 0.05, - 0, - SizeConfig.realScreenWidth * 0.05, - 0), - child: Container( - margin: EdgeInsets.symmetric(vertical: 10), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(20.0), - ), - ), - child: ListView.builder( - itemCount: model.patientRadiologyList.length, - itemBuilder: (BuildContext context, int index) { - return InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - RadiologyReportScreen( - reportData: model - .patientRadiologyList[index] - .reportData, - url: model - .patientRadiologyList[index].imageURL, - )), - ); - }, - child: Container( - padding: EdgeInsets.all(10), - margin: EdgeInsets.all(10), - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(10)), - border: Border( - bottom: BorderSide( - color: Colors.grey, width: 0.5), - top: BorderSide( - color: Colors.grey, width: 0.5), - left: BorderSide( - color: Colors.grey, width: 0.5), - right: BorderSide( - color: Colors.grey, width: 0.5), - ), - ), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - LargeAvatar( - url: model - .patientRadiologyList[index] - .doctorImageURL, - ), - Expanded( - child: Padding( - padding: - const EdgeInsets.fromLTRB( - 8, 0, 0, 0), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - AppText( - '${model.patientRadiologyList[index].doctorName}', - fontSize: 2.5 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight.bold), - SizedBox( - height: 8, - ), - AppText( - 'Invoice No:${model.patientRadiologyList[index].invoiceNo}', - fontSize: 2 * - SizeConfig - .textMultiplier, - ), - SizedBox( - height: 8, - ), - AppText( - ' ${model.patientRadiologyList[index].clinicName}', - fontSize: 2 * - SizeConfig - .textMultiplier, - color: Theme.of(context) - .primaryColor, - ), - SizedBox( - height: 8, - ), - ], - ), - ), - ) - ], - ), - ], - ), - ), - ); - }), - ), - ), - ),); - } -} 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/profile_screen.dart b/lib/screens/profile_screen.dart deleted file mode 100644 index 1e9e2459..00000000 --- a/lib/screens/profile_screen.dart +++ /dev/null @@ -1,91 +0,0 @@ -import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; -import 'package:flutter/material.dart'; - -import '../config/size_config.dart'; -import '../widgets/shared/app_scaffold_widget.dart'; -import '../widgets/shared/drawer_item_widget.dart'; -import '../widgets/shared/profile_image_widget.dart'; -import '../widgets/shared/rounded_container_widget.dart'; -import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; - -class ProfileScreen extends StatefulWidget { - ProfileScreen({Key key, this.title, this.doctorProfileall}) : super(key: key); - - final String title; - DoctorProfileModel doctorProfileall; - - @override - _ProfileScreenState createState() => _ProfileScreenState(); -} - -class _ProfileScreenState extends State { -//************************** - DoctorProfileModel doctorProfile; - //AppDrawer dr; -//****************** - @override - Widget build(BuildContext context) { - Map arg = ModalRoute.of(context).settings.arguments - as Map; //ModalRoute.of(context).settings.arguments; - doctorProfile = arg['doctorProfileall']; - print("******************"); - //print(doctorProfile.doctorName); - print("******************"); - return AppScaffold( - appBarTitle: TranslationBase.of(context).profile, - body: ListView(padding: EdgeInsets.zero, children: [ - Container( - height: MediaQuery.of(context).size.height * - 0.35, //SizeConfig.heightMultiplier * 35, - - child: Container( - child: DrawerHeader( - child: Container( - child: ProfileImageWidget( - url: doctorProfile.doctorImageURL, - //"https://p.kindpng.com/picc/s/404-4042774_profile-photo-circle-circle-profile-picture-png-transparent.png", - name: doctorProfile.doctorName, //"Dr. Chris evans", - des: doctorProfile - .clinicDescription //"Director of medical records", - ), - ), - ), - ), - ), - RoundedContainer( - child: ListView( - children: [ - DrawerItem( - TranslationBase.of(context).gender, - icon: Icons.person_pin, - color: Colors.black, - subTitle: doctorProfile.genderDescription //"Male" - , - ), - DrawerItem(TranslationBase.of(context).clinic, icon: Icons.build, - color: Colors.black, - subTitle: - doctorProfile.clinicDescription //"Neurology Clinic", - ), - DrawerItem( - TranslationBase.of(context).hospital, - icon: Icons.local_hospital, - color: Colors.black, - subTitle: doctorProfile.projectName, //"Al-Takkassussi", - ), - DrawerItem( - TranslationBase.of(context).speciality, - icon: Icons.crop_square, - color: Colors.black, - subTitle: doctorProfile.doctorRate == 0 - ? TranslationBase.of(context).beingBad - : TranslationBase.of(context).beingGreat, - ), - ], - ), - width: SizeConfig.screenWidth * 0.70, - height: SizeConfig.screenHeight * 0.40, - ), - ])); - } -} 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/settings/settings_screen.dart b/lib/screens/settings/settings_screen.dart deleted file mode 100644 index 16d53831..00000000 --- a/lib/screens/settings/settings_screen.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'package:doctor_app_flutter/config/config.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; -import 'package:doctor_app_flutter/core/viewModel/hospital_view_model.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:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; -import 'package:provider/provider.dart'; -class SettingsScreen extends StatelessWidget { - - ProjectViewModel projectsProvider; - @override - Widget build(BuildContext context) { - projectsProvider = Provider.of(context); - return AppScaffold( - appBarTitle: TranslationBase.of(context).settings.toUpperCase(), - body: ListView( - children: [ - AppText(TranslationBase.of(context).language.toUpperCase(),fontSize: 18,margin: 5,fontWeight: FontWeight.bold,), - Container( - margin: EdgeInsets.symmetric(horizontal: 10,vertical: 10), - height: 50, - decoration: BoxDecoration( - border: Border.all(color: Colors.grey[600],width: 2.0), - borderRadius: BorderRadius.circular(8.0) - ), - child: ClipRRect( - borderRadius: BorderRadius.circular(7.0), - child: Row( - children: [ - Expanded( - child: InkWell( - onTap: () { projectsProvider.changeLanguage('en'); }, - child: AnimatedContainer( - duration: Duration(milliseconds: 350), - decoration: BoxDecoration( - color: !projectsProvider.isArabic ? AppGlobal.appPrimaryColor : Colors.transparent, - border: Border(right: BorderSide(color: Colors.grey[200], width: 2.0)) - ), - child: Center(child: AppText(TranslationBase.of(context).lanEnglish, color: !projectsProvider.isArabic ? Colors.white : Colors.grey[500])) - ), - ), - ), - Expanded( - child: InkWell( - onTap: (){projectsProvider.changeLanguage('ar');}, - child: AnimatedContainer( - duration: Duration(milliseconds: 350), - decoration: BoxDecoration( - color: projectsProvider.isArabic ? AppGlobal.appPrimaryColor : Colors.transparent, - border: Border(right: BorderSide(color: Colors.grey[200], width: 2.0)) - ), - child: Center(child: AppText(TranslationBase.of(context).lanArabic, color: projectsProvider.isArabic ? Colors.white : Colors.grey[500],)) - ), - ), - ) - ], - ), - ), - ) - ], - ), - ); - } -} \ No newline at end of file diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart index 1da646ff..dd980f33 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( + child: AppText( TranslationBase.of(context).noSickLeave), ) ], 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