From 34f658a1664fce7d552cdd3a8fb8886f1d86d285 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Wed, 9 Feb 2022 16:37:45 +0200 Subject: [PATCH] Add Translation to prescription pages --- lib/config/localized_values.dart | 6 + .../viewModel/prescription_view_model.dart | 4 +- .../add_prescription/add_drug_widget.dart | 5 +- .../add_prescription/drug_to_drug.dart | 1 - .../prescription_form_widget.dart | 88 +---- .../search_preescription_widget.dart | 2 - .../prescription_checkout_screen.dart | 30 +- .../preacription_items_widget.dart | 157 +++++++++ .../prescription_items_in_patient.dart | 9 - .../prescription_items_out_patient.dart | 327 +----------------- .../prescription/prescriptions_page.dart | 4 - .../procedures/add-favourite-procedure.dart | 8 +- .../procedures/entity_list_fav_procedure.dart | 19 +- lib/util/translations_delegate_base.dart | 199 +++++------ .../app_text_field_custom_serach.dart | 5 +- 15 files changed, 281 insertions(+), 583 deletions(-) create mode 100644 lib/screens/prescription/prescriptions_items/preacription_items_widget.dart diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 253ffc67..bb8b1b1c 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1129,4 +1129,10 @@ const Map> localizedValues = { "VTE_Type": {"en": "VTE Type", "ar": "VTE Type"}, "pharmacology": {"en": "Pharmacology", "ar": "علم العقاقير"}, "reasonsThrombo": {"en": "Reasons Thrombo", "ar": "أسباب ثرومبو"}, + "youDoNotHaveFavoritePrescription": {"en": "you Don't Have Favorite Prescription", "ar": "ليس لديك وصفة طبية مفضلة"}, + "pleaseSelectItem": {"en": "please Select Item", "ar": "الرجاء اختيار عنصر"}, + "searchFavoriteTemplate": {"en": "search Favorites Template", "ar": "البحث في قالب المفضلة"}, + "sorryNoMatch": {"en": "Sorry No Match", "ar": "عذرا لا يوجد تطابق"}, + "thousandIsTheMAXForTheStrength": {"en": "1000 Is The MAX For The Strength", "ar": "ألف هو القيمة الأعلى"}, + "strengthCanNotBeZero": {"en": "Strength Can't Be Zero", "ar": "القوة لا يمكن أن تكون صفر "}, }; diff --git a/lib/core/viewModel/prescription_view_model.dart b/lib/core/viewModel/prescription_view_model.dart index 787b4f78..640b6037 100644 --- a/lib/core/viewModel/prescription_view_model.dart +++ b/lib/core/viewModel/prescription_view_model.dart @@ -313,11 +313,11 @@ class PrescriptionViewModel extends BaseViewModel { } getMedicationForInPatient(PatiantInformtion patient) async { - setState(ViewState.BusyLocal); + setState(ViewState.Busy); await _prescriptionsService.getMedicationForInPatient(patient); if (_prescriptionsService.hasError) { error = _prescriptionsService.error; - setState(ViewState.ErrorLocal); + setState(ViewState.Error); } else { setState(ViewState.Idle); } diff --git a/lib/screens/prescription/add_prescription/add_drug_widget.dart b/lib/screens/prescription/add_prescription/add_drug_widget.dart index 00a5a841..ae7b688e 100644 --- a/lib/screens/prescription/add_prescription/add_drug_widget.dart +++ b/lib/screens/prescription/add_prescription/add_drug_widget.dart @@ -47,7 +47,8 @@ class _AddDrugWidgetState extends State { Widget build(BuildContext context) { return AppScaffold( baseViewModel: widget.medicineModel, - appBar: BottomSheetTitle(title: "Add Medication",), + appBar: BottomSheetTitle( + title: TranslationBase.of(context).addMedication), body: Container( height: SizeConfig.realScreenHeight * .8, width: SizeConfig.realScreenWidth, @@ -110,7 +111,7 @@ class _AddDrugWidgetState extends State { } else if (widget.modelPrescription.state == ViewState.Idle) { widget.modelPrescription.getPrescriptions(widget.patient); GifLoaderDialogUtils.hideDialog(context); - DrAppToastMsg.showSuccesToast('Medication has been added'); + DrAppToastMsg.showSuccesToast(TranslationBase.of(context).medicationHasBeenAdded); Navigator.of(context).pop(); Navigator.of(context).pop(); } diff --git a/lib/screens/prescription/add_prescription/drug_to_drug.dart b/lib/screens/prescription/add_prescription/drug_to_drug.dart index b008fda0..350021b5 100644 --- a/lib/screens/prescription/add_prescription/drug_to_drug.dart +++ b/lib/screens/prescription/add_prescription/drug_to_drug.dart @@ -116,7 +116,6 @@ class _DrugToDrug extends State { widget.patient.appointmentNo, doctorID: '', editedBy: ''); - /// TODO Elham* rename model to meaning full not just modle with number await vitalSignsViewModel.getPatientVitalSign(widget.patient); await soapViewModel.getPatientAllergy(generalGetReqForSOAP); diff --git a/lib/screens/prescription/add_prescription/prescription_form_widget.dart b/lib/screens/prescription/add_prescription/prescription_form_widget.dart index e83c9348..6bdf447a 100644 --- a/lib/screens/prescription/add_prescription/prescription_form_widget.dart +++ b/lib/screens/prescription/add_prescription/prescription_form_widget.dart @@ -25,7 +25,6 @@ import 'package:flutter/services.dart'; import 'package:hexcolor/hexcolor.dart'; import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_to_text.dart' as stt; - import '../../../widgets/transitions/slide_up_page.dart'; import 'add_drug_widget.dart'; @@ -198,7 +197,7 @@ class _PrescriptionFormWidgetState extends State { width: MediaQuery.of(context).size.width * 0.35, child: AppTextFieldCustom( validationError: strengthError, - hintText: 'Strength', + hintText: TranslationBase.of(context).strength, isTextFieldHasSuffix: false, enabled: true, controller: strengthController, @@ -217,48 +216,10 @@ class _PrescriptionFormWidgetState extends State { decimal: true, ), ), - - - - ), SizedBox( width: 5.0, ), - // Container( - // width: MediaQuery.of(context) - // .size - // .width * - // 0.35, - // child: AppTextFieldCustom( - // height: 38, - // validationError: - // unitError, - // hintText: 'Unit', - // isTextFieldHasSuffix: false, - // enabled: true, - // controller: - // unitController, - // onChanged: (selectedValue) { - // setState(() { - // units = selectedValue; - // units['isDefault'] = true; - // }); - // if (strengthChar >= 5) { - // DrAppToastMsg - // .showErrorToast( - // TranslationBase.of( - // context) - // .only5DigitsAllowedForStrength, - // ); - // } - // }, - // inputType: TextInputType - // .numberWithOptions( - // decimal: true, - // ), - // ), - // ), PrescriptionTextFiled( width: MediaQuery.of(context).size.width * 0.510, element: @@ -266,9 +227,9 @@ class _PrescriptionFormWidgetState extends State { ? widget.medicineViewModel.itemMedicineListUnit[0] : units, elementError: unitError, - keyName: 'description', + keyName: TranslationBase.of(context).description, keyId: 'parameterCode', - hintText: 'Unit', + hintText: TranslationBase.of(context).unit, elementList: widget.medicineViewModel.itemMedicineListUnit, okFunction: (selectedValue) { setState(() { @@ -287,7 +248,7 @@ class _PrescriptionFormWidgetState extends State { : route, elementError: routeError, keyId: 'parameterCode', - keyName: 'description', + keyName: TranslationBase.of(context).description, okFunction: (selectedValue) { setState(() { route = selectedValue; @@ -306,7 +267,7 @@ class _PrescriptionFormWidgetState extends State { : frequency, elementList: widget.medicineViewModel.itemMedicineList, keyId: 'parameterCode', - keyName: 'description', + keyName: TranslationBase.of(context).description, okFunction: (selectedValue) { setState(() { frequency = selectedValue; @@ -352,11 +313,6 @@ class _PrescriptionFormWidgetState extends State { hintText: widget .medicineViewModel.patientAssessmentList[0].icdCode10ID .toString(), - // indication != null - // ? indication[ - // 'name'] - // : null, - enabled: true, ), ), @@ -368,10 +324,6 @@ class _PrescriptionFormWidgetState extends State { hintText: widget .medicineViewModel.patientAssessmentList[0].asciiDesc .toString(), - // indication != null - // ? indication[ - // 'name'] - // : null, enabled: true, ), ), @@ -384,7 +336,7 @@ class _PrescriptionFormWidgetState extends State { onTap: () => selectDate(context, widget.prescriptionViewModel), child: AppTextFieldCustom( validationError: strengthError, - hintText: 'Date', + hintText: TranslationBase.of(context).date, isTextFieldHasSuffix: true, suffixIcon: IconButton( icon: Icon( @@ -397,23 +349,6 @@ class _PrescriptionFormWidgetState extends State { : null, enabled: false, ), - - // TextField( - // decoration: - // textFieldSelectorDecoration( - // TranslationBase.of( - // context) - // .date, - // selectedDate != null - // ? "${AppDateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" - // : null, - // true, - // suffixIcon: Icon( - // Icons.calendar_today, - // color: Colors.black, - // )), - // enabled: false, - // ), ), ), SizedBox(height: spaceBetweenTextFields), @@ -431,12 +366,6 @@ class _PrescriptionFormWidgetState extends State { duration != null && frequency != null && strengthController.text != null) { - // widget.medicineViewModel.getBoxQuantity( - // freq: frequency['parameterCode'], - // duration: duration['id'], - // itemCode: widget.selectedMedication.itemId, - // strength: double.parse(strengthController.text), - // ); box = widget.medicineViewModel.boxQuintity; return; } @@ -477,7 +406,6 @@ class _PrescriptionFormWidgetState extends State { minLines: 4, hintText: TranslationBase.of(context).instruction, controller: instructionController, - //keyboardType: TextInputType.number, ), Positioned( top: 0, @@ -554,11 +482,11 @@ class _PrescriptionFormWidgetState extends State { } if (double.parse(strengthController.text) > 1000.0) { - DrAppToastMsg.showErrorToast("1000 is the MAX for the strength"); + DrAppToastMsg.showErrorToast(TranslationBase.of(context).thousandIsTheMAXForTheStrength); return; } if (double.parse(strengthController.text) < 0.0) { - DrAppToastMsg.showErrorToast("strength can't be zero"); + DrAppToastMsg.showErrorToast(TranslationBase.of(context).strengthCanNotBeZero); return; } diff --git a/lib/screens/prescription/add_prescription/search_preescription_widget.dart b/lib/screens/prescription/add_prescription/search_preescription_widget.dart index 7bd0508d..2d84c110 100644 --- a/lib/screens/prescription/add_prescription/search_preescription_widget.dart +++ b/lib/screens/prescription/add_prescription/search_preescription_widget.dart @@ -1,8 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; -import 'package:html_editor_enhanced/utils/utils.dart'; - import '../../../config/config.dart'; import '../../../core/model/search_drug/get_medication_response_model.dart'; import '../../../core/viewModel/medicine_view_model.dart'; diff --git a/lib/screens/prescription/prescription_checkout_screen.dart b/lib/screens/prescription/prescription_checkout_screen.dart index dfeea9f6..8f2d8b9d 100644 --- a/lib/screens/prescription/prescription_checkout_screen.dart +++ b/lib/screens/prescription/prescription_checkout_screen.dart @@ -97,7 +97,7 @@ class _PrescriptionCheckOutScreenState Helpers.showErrorToast(model.error); } else if (model.state == ViewState.Idle) { model.getPrescriptions(patient); - DrAppToastMsg.showSuccesToast('Medication has been added'); + DrAppToastMsg.showSuccesToast(TranslationBase.of(context).medicationHasBeenAdded); } } @@ -362,7 +362,7 @@ class _PrescriptionCheckOutScreenState child: AppTextFieldCustom( height: 40, validationError: strengthError, - hintText: 'Strength', + hintText: TranslationBase.of(context).strength, isTextFieldHasSuffix: false, enabled: true, controller: strengthController, @@ -395,7 +395,7 @@ class _PrescriptionCheckOutScreenState 0.560, element: units, elementError: unitError, - keyName: 'description', + keyName: TranslationBase.of(context).description, keyId: 'parameterCode', hintText: 'Select', elementList: @@ -417,7 +417,7 @@ class _PrescriptionCheckOutScreenState element: route, elementError: routeError, keyId: 'parameterCode', - keyName: 'description', + keyName: TranslationBase.of(context).description, okFunction: (selectedValue) { setState(() { route = selectedValue; @@ -435,7 +435,7 @@ class _PrescriptionCheckOutScreenState element: frequency, elementList: model.itemMedicineList, keyId: 'parameterCode', - keyName: 'description', + keyName: TranslationBase.of(context).description, okFunction: (selectedValue) { setState(() { frequency = selectedValue; @@ -651,19 +651,12 @@ class _PrescriptionCheckOutScreenState selectedDate != null && strengthController.text != "") { - // if (_selectedMedication.isNarcotic == true) { - // DrAppToastMsg.showErrorToast(TranslationBase.of(context) - // .narcoticMedicineCanOnlyBePrescribedFromVida); - // Navigator.pop(context); - // return; - // } - if (double.parse( strengthController .text) > 1000.0) { DrAppToastMsg.showErrorToast( - "1000 is the MAX for the strength"); + TranslationBase.of(context).thousandIsTheMAXForTheStrength,); return; } if (double.parse( @@ -671,14 +664,12 @@ class _PrescriptionCheckOutScreenState .text) < 0.0) { DrAppToastMsg.showErrorToast( - "strength can't be zero"); + TranslationBase.of(context).strengthCanNotBeZero,); return; } - if (formKey.currentState .validate()) { Navigator.pop(context); - // openDrugToDrug(model); { postPrescription( icdCode: model @@ -696,13 +687,6 @@ class _PrescriptionCheckOutScreenState .icdCode10ID .toString() : "test", - // icdCode: model - // .patientAssessmentList - // .map((value) => value - // .icdCode10ID - // .trim()) - // .toList() - // .join(' '), dose: strengthController .text, doseUnit: model diff --git a/lib/screens/prescription/prescriptions_items/preacription_items_widget.dart b/lib/screens/prescription/prescriptions_items/preacription_items_widget.dart new file mode 100644 index 00000000..ce8a530a --- /dev/null +++ b/lib/screens/prescription/prescriptions_items/preacription_items_widget.dart @@ -0,0 +1,157 @@ +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart'; +import 'package:eva_icons_flutter/eva_icons_flutter.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import '../../../core/viewModel/prescriptions_view_model.dart'; +import '../../../widgets/shared/dialogs/ShowImageDialog.dart'; + + +class PrescriptionItemsWidget extends StatelessWidget { + final String itemDescription; + final String route; + final String frequency; + final int dailyDoses; + final String imageSRCUrl; + final String remarks; + final int days; + final PrescriptionsViewModel prescriptionsViewModel; + + + + PrescriptionItemsWidget( + {this.itemDescription, + this.route, + this.frequency, + this.dailyDoses, + this.imageSRCUrl, + this.remarks, + this.days, + this.prescriptionsViewModel}); + + @override + Widget build(BuildContext context) { + return Column( + children: [ + ...List.generate( + // TODO Elham* List.generate to list.builder + prescriptionsViewModel.prescriptionReportEnhList.length, + (index) => Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white, + ), + margin: EdgeInsets.all(12), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 18, right: 18), + child: AppText( + prescriptionsViewModel.prescriptionReportEnhList[index].itemDescription, + bold: true, + ), + ), + SizedBox( + height: 12, + ), + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox( + width: 18, + ), + Container( + decoration: BoxDecoration( + shape: BoxShape.circle, + border: Border.all( + width: 0.5, color: Colors.grey)), + height: 55, + width: 55, + child: InkWell( + onTap: () { + showDialog( + context: context, + builder: (ctx) => ShowImageDialog( + imageUrl: prescriptionsViewModel.prescriptionReportEnhList[index].imageSRCUrl, + )); + }, + child: Stack( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Image.network( + prescriptionsViewModel.prescriptionReportEnhList[index].imageSRCUrl, + fit: BoxFit.cover, + ), + ), + Positioned( + top: 10, + right: 10, + child: Icon( + EvaIcons.search, + color: Colors.grey, + size: 35, + )) + ], + ), + ), + ), + SizedBox( + width: 10, + ), + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + CustomRow( + label: TranslationBase.of(context).route + ' : ', + value: " " + prescriptionsViewModel.prescriptionReportEnhList[index].route ?? '', + labelSize: 13, + valueSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).frequency + ' : ', + value: " " + prescriptionsViewModel.prescriptionReportEnhList[index].frequency ?? '', + labelSize: 13, + valueSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).dailyDoses + ' : ', + value: " " + prescriptionsViewModel.prescriptionReportEnhList[index].doseDailyQuantity.toString() ?? '', + labelSize: 13, + valueSize: 13, + ), + CustomRow( + label: TranslationBase.of(context).duration + ' : ', + value: " " + prescriptionsViewModel.prescriptionReportList[index].days.toString() ?? '', + labelSize: 13, + valueSize: 13, + ), + SizedBox( + height: 12, + ), + CustomRow( + label: '', + value: prescriptionsViewModel.prescriptionReportList[index].remarks ?? '', + valueSize: 14, + ), + ], + ), + ) + ], + ) + ], + ), + ), + ), + ), + ], + ); + } +} diff --git a/lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart b/lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart index 5c54289d..787f6853 100644 --- a/lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart +++ b/lib/screens/prescription/prescriptions_items/prescription_items_in_patient.dart @@ -203,15 +203,6 @@ class PrescriptionItemsInPatientPage extends StatelessWidget { ''), ], ), - // Row( - // children: [ - // AppText( - // TranslationBase.of(context).num, - // color: Colors.grey, - // ), - // AppText(" " + prescriptions.dose.toString() ?? ''), - // ], - // ), SizedBox( height: 12, ), diff --git a/lib/screens/prescription/prescriptions_items/prescription_items_out_patient.dart b/lib/screens/prescription/prescriptions_items/prescription_items_out_patient.dart index bf1632fd..fa8cebc2 100644 --- a/lib/screens/prescription/prescriptions_items/prescription_items_out_patient.dart +++ b/lib/screens/prescription/prescriptions_items/prescription_items_out_patient.dart @@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart'; import 'package:doctor_app_flutter/core/viewModel/prescriptions_view_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/prescription/prescriptions_items/preacription_items_widget.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/app_bar/patient-profile-app-bar.dart'; @@ -15,14 +16,12 @@ import 'package:flutter/material.dart'; class PrescriptionItemsPage extends StatelessWidget { final Prescriptions prescriptions; final PatiantInformtion patient; - final String patientType; final String arrivalType; PrescriptionItemsPage( {Key key, this.prescriptions, this.patient, - this.patientType, this.arrivalType}); @override @@ -49,323 +48,19 @@ class PrescriptionItemsPage extends StatelessWidget { child: Container( child: Column( children: [ - if (!prescriptions.isInOutPatient) ...List.generate( - // TODO Elham* List.generate to list.builder model.prescriptionReportList.length, - (index) => Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.white, - ), - margin: EdgeInsets.all(12), - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: - EdgeInsets.only(left: 18, right: 18), - child: AppText( - model.prescriptionReportList[index] - .itemDescription.isNotEmpty - ? model - .prescriptionReportList[index] - .itemDescription - : model - .prescriptionReportList[index] - .itemDescriptionN, - bold: true, - )), - SizedBox( - height: 12, - ), - Row( - children: [ - SizedBox( - width: 18, - ), - Container( - decoration: BoxDecoration( - shape: BoxShape.circle, - border: Border.all( - width: 0.5, - color: Colors.grey)), - height: 55, - width: 55, - child: InkWell( - onTap: () { - showDialog( - context: context, - builder: (ctx) => - ShowImageDialog( - imageUrl: model - .prescriptionReportEnhList[ - index] - .imageSRCUrl, - )); - }, - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Image.network( - model - .prescriptionReportList[index] - .imageSRCUrl, - fit: BoxFit.cover, - ), - ), - ), - ), - SizedBox( - width: 10, - ), - Expanded( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context) - .route, - color: Colors.grey, - ), - Expanded( - child: AppText(" " + - model - .prescriptionReportList[ - index] - .routeN)), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .frequency, - color: Colors.grey, - ), - AppText(" " + - model - .prescriptionReportList[ - index] - .frequencyN ?? - ''), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .dailyDoses, - color: Colors.grey, - ), - AppText(" " + - model - .prescriptionReportList[ - index] - .doseDailyQuantity ?? - ''), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .duration, - color: Colors.grey, - ), - AppText(" " + - model - .prescriptionReportList[ - index] - .days - .toString() ?? - ''), - ], - ), - SizedBox( - height: 12, - ), - AppText(model - .prescriptionReportList[ - index] - .remarks ?? - ''), - ], - ), - ) - ], - ) - ], - ), - ), - )) - else - ...List.generate( - // TODO Elham* List.generate to list.builder - model.prescriptionReportEnhList.length, - (index) => Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.white, - ), - margin: EdgeInsets.all(12), - // TODO Elham* use custom card - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - margin: EdgeInsets.only(left: 18, right: 18), - child: AppText( - model.prescriptionReportEnhList[index] - .itemDescription, - bold: true, - ), - ), - SizedBox( - height: 12, - ), - Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - SizedBox( - width: 18, - ), - Container( - decoration: BoxDecoration( - shape: BoxShape.circle, - border: Border.all( - width: 0.5, color: Colors.grey)), - height: 55, - width: 55, - child: InkWell( - onTap: () { - showDialog( - context: context, - builder: (ctx) => ShowImageDialog( - imageUrl: model - .prescriptionReportEnhList[ - index] - .imageSRCUrl, - )); - }, - child: Stack( - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Image.network( - model - .prescriptionReportEnhList[ - index] - .imageSRCUrl, - fit: BoxFit.cover, - ), - ), - Positioned( - top: 10, - right: 10, - child: Icon( - EvaIcons.search, - color: Colors.grey, - size: 35, - )) - ], - ), - ), - ), - SizedBox( - width: 10, - ), - Expanded( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).route, - color: Colors.grey, - ), - Expanded( - child: AppText(" " + - model - .prescriptionReportEnhList[ - index] - .route ?? - '')), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .frequency, - color: Colors.grey, - ), - AppText(" " + - model - .prescriptionReportEnhList[ - index] - .frequency ?? - ''), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .dailyDoses, - color: Colors.grey, - ), - AppText(" " + - model - .prescriptionReportEnhList[ - index] - .doseDailyQuantity - .toString() ?? - ''), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context) - .duration, - color: Colors.grey, - ), - AppText(" " + - model - .prescriptionReportList[ - index] - .days - .toString() ?? - ''), - ], - ), - SizedBox( - height: 12, - ), - AppText(model - .prescriptionReportEnhList[index] - .remarks ?? - ''), - ], - ), - ) - ], - ) - ], - ), + (index) => PrescriptionItemsWidget( + frequency: model.prescriptionReportEnhList[index].frequency, + itemDescription: model.prescriptionReportEnhList[index].itemDescription, + days: model.prescriptionReportEnhList[index].days, + route: model.prescriptionReportEnhList[index].route, + dailyDoses: model.prescriptionReportEnhList[index].doseDailyQuantity, + imageSRCUrl: model.prescriptionReportEnhList[index].imageSRCUrl, + remarks: model.prescriptionReportEnhList[index].remarks, + prescriptionsViewModel: model, ), - ), - ), + ) ], ), ), diff --git a/lib/screens/prescription/prescriptions_page.dart b/lib/screens/prescription/prescriptions_page.dart index 72d45d46..30311af2 100644 --- a/lib/screens/prescription/prescriptions_page.dart +++ b/lib/screens/prescription/prescriptions_page.dart @@ -1,4 +1,3 @@ -import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart'; import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; @@ -12,7 +11,6 @@ import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-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/doctor_card.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:doctor_app_flutter/widgets/shared/user-guid/in_patient_doctor_card.dart'; @@ -20,7 +18,6 @@ import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/slide_up_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; - import '../../util/helpers.dart'; import '../../widgets/shared/errors/error_message.dart'; @@ -115,7 +112,6 @@ class PrescriptionsPage extends StatelessWidget { page: PrescriptionItemsPage( prescriptions: model.prescriptionsList[index], patient: patient, - patientType: patientType, arrivalType: arrivalType, ), ), diff --git a/lib/screens/procedures/add-favourite-procedure.dart b/lib/screens/procedures/add-favourite-procedure.dart index 4df2726e..84d92d4f 100644 --- a/lib/screens/procedures/add-favourite-procedure.dart +++ b/lib/screens/procedures/add-favourite-procedure.dart @@ -11,12 +11,8 @@ 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_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'; - -import '../../config/config.dart'; -import '../../widgets/shared/loader/gif_loader_dialog_utils.dart'; import '../patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'ProcedureType.dart'; @@ -86,7 +82,7 @@ class _AddFavouriteProcedureState extends State { child: Padding( padding: EdgeInsets.symmetric(vertical: 50.0), child: AppText( - 'You Don\'t have favorite prescription'), + TranslationBase.of(context).youDoNotHaveFavoritePrescription,), ), ), ], @@ -98,7 +94,7 @@ class _AddFavouriteProcedureState extends State { if (widget.procedureType == ProcedureType.PRESCRIPTION) { if (groupProcedures == null) { DrAppToastMsg.showErrorToast( - 'Please Select item ', + TranslationBase.of(context).pleaseSelectItem, ); return; } diff --git a/lib/screens/procedures/entity_list_fav_procedure.dart b/lib/screens/procedures/entity_list_fav_procedure.dart index 4c8308f4..1aa73c25 100644 --- a/lib/screens/procedures/entity_list_fav_procedure.dart +++ b/lib/screens/procedures/entity_list_fav_procedure.dart @@ -1,14 +1,12 @@ import 'package:doctor_app_flutter/core/model/procedure/procedure_templateModel.dart'; import 'package:doctor_app_flutter/core/model/procedure/procedure_template_details_model.dart'; import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; +import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; -import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; - import '../../config/config.dart'; import '../../widgets/shared/text_fields/app_text_field_custom_serach.dart'; import 'ExpansionProcedure.dart'; @@ -95,16 +93,6 @@ class _EntityListCheckboxSearchFavProceduresWidgetState color: Colors.white), child: ListView( children: [ - // TextFields( - // hintText: 'Search Favourite templates', - // suffixIcon: EvaIcons.search, - // suffixIconColor: Color(0xff2B353E), - // onChanged: (value) { - // filterSearchResults(value); - // }, - // hasBorder: false, - // ), - AppTextFieldCustomSearch( searchController: patientFileInfoController, onChangeFun: (value) { @@ -116,7 +104,7 @@ class _EntityListCheckboxSearchFavProceduresWidgetState RegExp(ONLY_LETTERS)) ], inputType: TextInputType.text, - hintText: 'Search Favourite templates', + hintText: TranslationBase.of(context).searchFavoriteTemplate, // validationError: TranslationBase.of(context).emptyMessage // : null, ), @@ -143,7 +131,8 @@ class _EntityListCheckboxSearchFavProceduresWidgetState ) : Center( child: Container( - child: AppText("Sorry , No Match", + child: AppText( + TranslationBase.of(context).sorryNoMatch, color: AppGlobal.appRedColor), ), ) diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index d58139b3..f2382a88 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -13,13 +13,11 @@ class TranslationBase { return Localizations.of(context, TranslationBase); } - String get dashboardScreenToolbarTitle => - localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; + String get dashboardScreenToolbarTitle => localizedValues['dashboardScreenToolbarTitle'][locale.languageCode]; String get settings => localizedValues['settings'][locale.languageCode]; - String get areYouSureYouWantTo => - localizedValues['areYouSureYouWantTo'][locale.languageCode]; + String get areYouSureYouWantTo => localizedValues['areYouSureYouWantTo'][locale.languageCode]; String get language => localizedValues['language'][locale.languageCode]; @@ -37,48 +35,37 @@ class TranslationBase { String get mobileNo => localizedValues['mobileNo'][locale.languageCode]; - String get replySuccessfully => - localizedValues['replySuccessfully'][locale.languageCode]; + String get replySuccessfully => localizedValues['replySuccessfully'][locale.languageCode]; - String get messagesScreenToolbarTitle => - localizedValues['messagesScreenToolbarTitle'][locale.languageCode]; + String get messagesScreenToolbarTitle => localizedValues['messagesScreenToolbarTitle'][locale.languageCode]; String get mySchedule => localizedValues['mySchedule'][locale.languageCode]; - String get errorNoSchedule => - localizedValues['errorNoSchedule'][locale.languageCode]; + String get errorNoSchedule => localizedValues['errorNoSchedule'][locale.languageCode]; String get verify => localizedValues['verify'][locale.languageCode]; - String get referralDoctor => - localizedValues['referralDoctor'][locale.languageCode]; + String get referralDoctor => localizedValues['referralDoctor'][locale.languageCode]; - String get referringClinic => - localizedValues['referringClinic'][locale.languageCode]; + String get referringClinic => localizedValues['referringClinic'][locale.languageCode]; String get frequency => localizedValues['frequency'][locale.languageCode]; String get priority => localizedValues['priority'][locale.languageCode]; - String get maxResponseTime => - localizedValues['maxResponseTime'][locale.languageCode]; + String get maxResponseTime => localizedValues['maxResponseTime'][locale.languageCode]; - String get clinicDetailsandRemarks => - localizedValues['clinicDetailsandRemarks'][locale.languageCode]; + String get clinicDetailsandRemarks => localizedValues['clinicDetailsandRemarks'][locale.languageCode]; - String get answerSuggestions => - localizedValues['answerSuggestions'][locale.languageCode]; + String get answerSuggestions => localizedValues['answerSuggestions'][locale.languageCode]; String get outPatients => localizedValues['outPatients'][locale.languageCode]; - String get searchPatient => - localizedValues['searchPatient'][locale.languageCode]; + String get searchPatient => localizedValues['searchPatient'][locale.languageCode]; - String get searchPatientDashBoard => - localizedValues['searchPatientDashBoard'][locale.languageCode]; + String get searchPatientDashBoard => localizedValues['searchPatientDashBoard'][locale.languageCode]; - String get searchPatientName => - localizedValues['searchPatient-name'][locale.languageCode]; + String get searchPatientName => localizedValues['searchPatient-name'][locale.languageCode]; String get searchAbout => localizedValues['searchAbout'][locale.languageCode]; @@ -88,11 +75,9 @@ class TranslationBase { String get labResult => localizedValues['labResult'][locale.languageCode]; - String get todayStatistics => - localizedValues['todayStatistics'][locale.languageCode]; + String get todayStatistics => localizedValues['todayStatistics'][locale.languageCode]; - String get familyMedicine => - localizedValues['familyMedicine'][locale.languageCode]; + String get familyMedicine => localizedValues['familyMedicine'][locale.languageCode]; String get arrived => localizedValues['arrived'][locale.languageCode]; @@ -112,36 +97,27 @@ class TranslationBase { String get myInPatient => localizedValues['myInPatient'][locale.languageCode]; - String get myInPatientTitle => - localizedValues['myInPatientTitle'][locale.languageCode]; + String get myInPatientTitle => localizedValues['myInPatientTitle'][locale.languageCode]; - String get inPatientLabel => - localizedValues['inPatientLabel'][locale.languageCode]; + String get inPatientLabel => localizedValues['inPatientLabel'][locale.languageCode]; - String get inPatientAll => - localizedValues['inPatientAll'][locale.languageCode]; + String get inPatientAll => localizedValues['inPatientAll'][locale.languageCode]; String get operations => localizedValues['operations'][locale.languageCode]; - String get patientServices => - localizedValues['patientServices'][locale.languageCode]; + String get patientServices => localizedValues['patientServices'][locale.languageCode]; - String get searchMedicine => - localizedValues['searchMedicine'][locale.languageCode]; + String get searchMedicine => localizedValues['searchMedicine'][locale.languageCode]; - String get searchMedicineDashboard => - localizedValues['searchMedicineDashboard'][locale.languageCode]; + String get searchMedicineDashboard => localizedValues['searchMedicineDashboard'][locale.languageCode]; - String get myReferralPatient => - localizedValues['myReferralPatient'][locale.languageCode]; + String get myReferralPatient => localizedValues['myReferralPatient'][locale.languageCode]; - String get referPatient => - localizedValues['referPatient'][locale.languageCode]; + String get referPatient => localizedValues['referPatient'][locale.languageCode]; String get myReferral => localizedValues['myReferral'][locale.languageCode]; - String get myReferredPatient => - localizedValues['myReferredPatient'][locale.languageCode]; + String get myReferredPatient => localizedValues['myReferredPatient'][locale.languageCode]; String get referredPatient => localizedValues['referredPatient'][locale.languageCode]; @@ -150,18 +126,15 @@ class TranslationBase { String get firstName => localizedValues['firstName'][locale.languageCode]; - String get firstNameInAr => - localizedValues['firstNameInAr'][locale.languageCode]; + String get firstNameInAr => localizedValues['firstNameInAr'][locale.languageCode]; String get middleName => localizedValues['middleName'][locale.languageCode]; - String get middleNameInAr => - localizedValues['middleNameInAr'][locale.languageCode]; + String get middleNameInAr => localizedValues['middleNameInAr'][locale.languageCode]; String get lastName => localizedValues['lastName'][locale.languageCode]; - String get lastNameInAr => - localizedValues['lastNameInAr'][locale.languageCode]; + String get lastNameInAr => localizedValues['lastNameInAr'][locale.languageCode]; String get phoneNumber => localizedValues['phoneNumber'][locale.languageCode]; @@ -171,23 +144,19 @@ class TranslationBase { String get search => localizedValues['search'][locale.languageCode]; - String get onlyArrivedPatient => - localizedValues['onlyArrivedPatient'][locale.languageCode]; + String get onlyArrivedPatient => localizedValues['onlyArrivedPatient'][locale.languageCode]; - String get searchMedicineNameHere => - localizedValues['searchMedicineNameHere'][locale.languageCode]; + String get searchMedicineNameHere => localizedValues['searchMedicineNameHere'][locale.languageCode]; String get youCanFind => localizedValues['youCanFind'][locale.languageCode]; - String get medicineSearchResult => - localizedValues['medicineSearchResult'][locale.languageCode]; + String get medicineSearchResult => localizedValues['medicineSearchResult'][locale.languageCode]; String get qr => localizedValues['qr'][locale.languageCode]; String get reader => localizedValues['reader'][locale.languageCode]; - String get startScanning => - localizedValues['startScanning'][locale.languageCode]; + String get startScanning => localizedValues['startScanning'][locale.languageCode]; String get scanQrCode => localizedValues['scanQrCode'][locale.languageCode]; @@ -199,21 +168,17 @@ class TranslationBase { String get clinic => localizedValues['clinic'][locale.languageCode]; - String get clinicSelect => - localizedValues['clinicSelect'][locale.languageCode]; + String get clinicSelect => localizedValues['clinicSelect'][locale.languageCode]; - String get doctorSelect => - localizedValues['doctorSelect'][locale.languageCode]; + String get doctorSelect => localizedValues['doctorSelect'][locale.languageCode]; String get hospital => localizedValues['hospital'][locale.languageCode]; String get speciality => localizedValues['speciality'][locale.languageCode]; - String get errorMessage => - localizedValues['errorMessage'][locale.languageCode]; + String get errorMessage => localizedValues['errorMessage'][locale.languageCode]; - String get patientProfile => - localizedValues['patientProfile'][locale.languageCode]; + String get patientProfile => localizedValues['patientProfile'][locale.languageCode]; String get vitalSign => localizedValues['vitalSign'][locale.languageCode]; @@ -229,18 +194,15 @@ class TranslationBase { String get medicines => localizedValues['medicines'][locale.languageCode]; - String get prescription => - localizedValues['prescription'][locale.languageCode]; + String get prescription => localizedValues['prescription'][locale.languageCode]; - String get insuranceApprovals => - localizedValues['insuranceApprovals'][locale.languageCode]; + String get insuranceApprovals => localizedValues['insuranceApprovals'][locale.languageCode]; String get insurance => localizedValues['insurance'][locale.languageCode]; String get approvals => localizedValues['approvals'][locale.languageCode]; - String get bodyMeasurements => - localizedValues['bodyMeasurements'][locale.languageCode]; + String get bodyMeasurements => localizedValues['bodyMeasurements'][locale.languageCode]; String get temperature => localizedValues['temperature'][locale.languageCode]; @@ -248,34 +210,27 @@ class TranslationBase { String get respiration => localizedValues['respiration'][locale.languageCode]; - String get bloodPressure => - localizedValues['bloodPressure'][locale.languageCode]; + String get bloodPressure => localizedValues['bloodPressure'][locale.languageCode]; String get oxygenation => localizedValues['oxygenation'][locale.languageCode]; String get painScale => localizedValues['painScale'][locale.languageCode]; - String get errorNoVitalSign => - localizedValues['errorNoVitalSign'][locale.languageCode]; + String get errorNoVitalSign => localizedValues['errorNoVitalSign'][locale.languageCode]; String get labOrders => localizedValues['labOrders'][locale.languageCode]; - String get errorNoLabOrders => - localizedValues['errorNoLabOrders'][locale.languageCode]; + String get errorNoLabOrders => localizedValues['errorNoLabOrders'][locale.languageCode]; - String get answerThePatient => - localizedValues['answerThePatient'][locale.languageCode]; + String get answerThePatient => localizedValues['answerThePatient'][locale.languageCode]; - String get pleaseEnterAnswer => - localizedValues['pleaseEnterAnswer'][locale.languageCode]; + String get pleaseEnterAnswer => localizedValues['pleaseEnterAnswer'][locale.languageCode]; String get replay => localizedValues['replay'][locale.languageCode]; - String get progressNote => - localizedValues['progressNote'][locale.languageCode]; + String get progressNote => localizedValues['progressNote'][locale.languageCode]; - String get operationReports => - localizedValues['operationReports'][locale.languageCode]; + String get operationReports => localizedValues['operationReports'][locale.languageCode]; String get reports => localizedValues['reports'][locale.languageCode]; @@ -287,15 +242,13 @@ class TranslationBase { String get searchNote => localizedValues['searchNote'][locale.languageCode]; - String get errorNoProgressNote => - localizedValues['errorNoProgressNote'][locale.languageCode]; + String get errorNoProgressNote => localizedValues['errorNoProgressNote'][locale.languageCode]; String get invoiceNo => localizedValues['invoiceNo:'][locale.languageCode]; String get orderNo => localizedValues['orderNo'][locale.languageCode]; - String get generalResult => - localizedValues['generalResult'][locale.languageCode]; + String get generalResult => localizedValues['generalResult'][locale.languageCode]; String get description => localizedValues['description'][locale.languageCode]; @@ -305,30 +258,23 @@ class TranslationBase { String get enterId => localizedValues['enterId'][locale.languageCode]; - String get pleaseEnterYourID => - localizedValues['pleaseEnterYourID'][locale.languageCode]; + String get pleaseEnterYourID => localizedValues['pleaseEnterYourID'][locale.languageCode]; - String get enterPassword => - localizedValues['enterPassword'][locale.languageCode]; + String get enterPassword => localizedValues['enterPassword'][locale.languageCode]; - String get pleaseEnterPassword => - localizedValues['pleaseEnterPassword'][locale.languageCode]; + String get pleaseEnterPassword => localizedValues['pleaseEnterPassword'][locale.languageCode]; - String get selectYourProject => - localizedValues['selectYourProject'][locale.languageCode]; + String get selectYourProject => localizedValues['selectYourProject'][locale.languageCode]; - String get pleaseEnterYourProject => - localizedValues['pleaseEnterYourProject'][locale.languageCode]; + String get pleaseEnterYourProject => localizedValues['pleaseEnterYourProject'][locale.languageCode]; String get login => localizedValues['login'][locale.languageCode]; - String get drSulaimanAlHabib => - localizedValues['drSulaimanAlHabib'][locale.languageCode]; + String get drSulaimanAlHabib => localizedValues['drSulaimanAlHabib'][locale.languageCode]; String get welcomeTo => localizedValues['welcomeTo'][locale.languageCode]; - String get welcomeBackTo => - localizedValues['welcomeBackTo'][locale.languageCode]; + String get welcomeBackTo => localizedValues['welcomeBackTo'][locale.languageCode]; String get home => localizedValues['home'][locale.languageCode]; @@ -344,23 +290,19 @@ class TranslationBase { String get whatsAppBy => localizedValues['whatsAppBy'][locale.languageCode]; - String get pleaseChoose => - localizedValues['pleaseChoose'][locale.languageCode]; + String get pleaseChoose => localizedValues['pleaseChoose'][locale.languageCode]; String get choose => localizedValues['choose'][locale.languageCode]; - String get verification => - localizedValues['verification'][locale.languageCode]; + String get verification => localizedValues['verification'][locale.languageCode]; String get firstStep => localizedValues['firstStep'][locale.languageCode]; - String get yourAccount => - localizedValues['yourAccount!'][locale.languageCode]; + String get yourAccount => localizedValues['yourAccount!'][locale.languageCode]; String get verify1 => localizedValues['verify1'][locale.languageCode]; - String get youWillReceiveA => - localizedValues['youWillReceiveA'][locale.languageCode]; + String get youWillReceiveA => localizedValues['youWillReceiveA'][locale.languageCode]; String get loginCode => localizedValues['loginCode'][locale.languageCode]; @@ -1742,19 +1684,32 @@ class TranslationBase { String get chart => localizedValues['chart'][locale.languageCode]; - String get investigation => - localizedValues['investigation'][locale.languageCode]; + String get investigation => localizedValues['investigation'][locale.languageCode]; - String get conditionOnDischarge => - localizedValues['conditionOnDischarge'][locale.languageCode]; + String get conditionOnDischarge => localizedValues['conditionOnDischarge'][locale.languageCode]; - String get planedProcedure => - localizedValues['planedProcedure'][locale.languageCode]; + String get planedProcedure => localizedValues['planedProcedure'][locale.languageCode]; String get moreDetails => localizedValues['moreDetails'][locale.languageCode]; + String get VTE_Type => localizedValues['VTE_Type'][locale.languageCode]; + String get pharmacology => localizedValues['pharmacology'][locale.languageCode]; + String get reasonsThrombo => localizedValues['reasonsThrombo'][locale.languageCode]; + + String get youDoNotHaveFavoritePrescription => localizedValues['youDoNotHaveFavoritePrescription'][locale.languageCode]; + + String get pleaseSelectItem => localizedValues['pleaseSelectItem'][locale.languageCode]; + + String get searchFavoriteTemplate => localizedValues['searchFavoriteTemplate'][locale.languageCode]; + + String get sorryNoMatch => localizedValues['sorryNoMatch'][locale.languageCode]; + + String get thousandIsTheMAXForTheStrength => localizedValues['thousandIsTheMAXForTheStrength'][locale.languageCode]; + + String get strengthCanNotBeZero => localizedValues['strengthCanNotBeZero'][locale.languageCode]; + } class TranslationBaseDelegate extends LocalizationsDelegate { diff --git a/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart b/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart index 355a0dc8..823b79aa 100644 --- a/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart +++ b/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart @@ -18,7 +18,7 @@ class AppTextFieldCustomSearch extends StatelessWidget { this.inputFormatters, this.searchController, this.onFieldSubmitted, - this.hintText, + this.hintText, this.height, }); final TextEditingController searchController; @@ -34,6 +34,8 @@ class AppTextFieldCustomSearch extends StatelessWidget { final TextInputType inputType; final List inputFormatters; + final double height; + @override Widget build(BuildContext context) { @@ -43,6 +45,7 @@ class AppTextFieldCustomSearch extends StatelessWidget { child: Stack( children: [ AppTextFieldCustom( + height: height??0, hintText: hintText ?? TranslationBase.of(context).searchPatientName, isTextFieldHasSuffix: true,