From dac8f90a8a7a9efe83562e435bb229bf472e739f Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Mon, 20 Sep 2021 09:27:14 +0300 Subject: [PATCH] rename file related to custom search --- lib/screens/live_care/live_care_patient_screen.dart | 4 ++-- lib/screens/medicine/medicine_search_screen.dart | 4 ++-- lib/screens/patients/DischargedPatientPage.dart | 4 ++-- lib/screens/patients/In_patient/in_patient_list_page.dart | 4 ++-- lib/screens/patients/out_patient/out_patient_screen.dart | 4 ++-- .../patient_search/patient_search_result_screen.dart | 4 ++-- .../patients/patient_search/patient_search_screen.dart | 4 ++-- lib/widgets/shared/text_fields/app-textfield-custom.dart | 8 ++++---- ...Customerach.dart => app_text_field_custom_serach.dart} | 6 +++--- 9 files changed, 21 insertions(+), 21 deletions(-) rename lib/widgets/shared/text_fields/{AppTextFieldCustomerach.dart => app_text_field_custom_serach.dart} (93%) diff --git a/lib/screens/live_care/live_care_patient_screen.dart b/lib/screens/live_care/live_care_patient_screen.dart index 240d627a..a9c7b38f 100644 --- a/lib/screens/live_care/live_care_patient_screen.dart +++ b/lib/screens/live_care/live_care_patient_screen.dart @@ -15,7 +15,7 @@ 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:doctor_app_flutter/widgets/shared/errors/error_message.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/AppTextFieldCustomerach.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_field_custom_serach.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:flutter/material.dart'; @@ -92,7 +92,7 @@ class _LiveCarePatientScreenState extends State { SizedBox( height: 20, ), - AppTextFieldCustomSerach( + AppTextFieldCustomSearch( searchController: _controller, onChangeFun: (value) { model.searchData(value); diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index 3685b7fc..6ebb2fc8 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -16,7 +16,7 @@ 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:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/AppTextFieldCustomerach.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_field_custom_serach.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -139,7 +139,7 @@ class _MedicineSearchState extends State { ), FractionallySizedBox( widthFactor: 0.9, - child: AppTextFieldCustomSerach( + child: AppTextFieldCustomSearch( hintText: TranslationBase.of(context).searchMedicineNameHere, searchController: myController, diff --git a/lib/screens/patients/DischargedPatientPage.dart b/lib/screens/patients/DischargedPatientPage.dart index 961b15ae..8ae41a93 100644 --- a/lib/screens/patients/DischargedPatientPage.dart +++ b/lib/screens/patients/DischargedPatientPage.dart @@ -7,7 +7,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/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/AppTextFieldCustomerach.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_field_custom_serach.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'; @@ -65,7 +65,7 @@ class _DischargedPatientState extends State { SizedBox( height: 12, ), - AppTextFieldCustomSerach( + AppTextFieldCustomSearch( searchController: _controller, onChangeFun: (value) { model.searchData(value); diff --git a/lib/screens/patients/In_patient/in_patient_list_page.dart b/lib/screens/patients/In_patient/in_patient_list_page.dart index 14c29a7a..6e9ad14f 100644 --- a/lib/screens/patients/In_patient/in_patient_list_page.dart +++ b/lib/screens/patients/In_patient/in_patient_list_page.dart @@ -6,7 +6,7 @@ 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/loader/gif_loader_dialog_utils.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/AppTextFieldCustomerach.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_field_custom_serach.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; @@ -141,7 +141,7 @@ class _InPatientListPageState extends State { ], ), ), - AppTextFieldCustomSerach( + AppTextFieldCustomSearch( searchController: _searchController, onChangeFun: (value) { setState(() { diff --git a/lib/screens/patients/out_patient/out_patient_screen.dart b/lib/screens/patients/out_patient/out_patient_screen.dart index 66a20186..e0e4fb4a 100644 --- a/lib/screens/patients/out_patient/out_patient_screen.dart +++ b/lib/screens/patients/out_patient/out_patient_screen.dart @@ -17,7 +17,7 @@ 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/errors/error_message.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/AppTextFieldCustomerach.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_field_custom_serach.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/text_fields_utils.dart'; import 'package:flutter/material.dart'; @@ -201,7 +201,7 @@ class _OutPatientsScreenState extends State { ), ), SizedBox(height: 18.5), - AppTextFieldCustomSerach( + AppTextFieldCustomSearch( searchController: _controller, onChangeFun: (value) { model.searchData(value); diff --git a/lib/screens/patients/patient_search/patient_search_result_screen.dart b/lib/screens/patients/patient_search/patient_search_result_screen.dart index 6df6a54c..b0ec2943 100644 --- a/lib/screens/patients/patient_search/patient_search_result_screen.dart +++ b/lib/screens/patients/patient_search/patient_search_result_screen.dart @@ -14,7 +14,7 @@ import 'package:doctor_app_flutter/widgets/patients/patient_card/PatientCard.dar 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/errors/error_message.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/AppTextFieldCustomerach.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_field_custom_serach.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_form_field.dart'; import 'package:flutter/material.dart'; import 'package:hexcolor/hexcolor.dart'; @@ -82,7 +82,7 @@ class _PatientsSearchResultScreenState body: Column( children: [ SizedBox(height: 18.5), - AppTextFieldCustomSerach( + AppTextFieldCustomSearch( searchController: _controller, onChangeFun: (value) { model.searchData(value); diff --git a/lib/screens/patients/patient_search/patient_search_screen.dart b/lib/screens/patients/patient_search/patient_search_screen.dart index 2f232906..e1fdd033 100644 --- a/lib/screens/patients/patient_search/patient_search_screen.dart +++ b/lib/screens/patients/patient_search/patient_search_screen.dart @@ -10,7 +10,7 @@ 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/buttons/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; -import 'package:doctor_app_flutter/widgets/shared/text_fields/AppTextFieldCustomerach.dart'; +import 'package:doctor_app_flutter/widgets/shared/text_fields/app_text_field_custom_serach.dart'; import 'package:doctor_app_flutter/widgets/shared/text_fields/app-textfield-custom.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -60,7 +60,7 @@ class _PatientSearchScreenState extends State { SizedBox( height: 10, ), - AppTextFieldCustomSerach( + AppTextFieldCustomSearch( searchController: patientFileInfoController, onChangeFun: (value) {}, marginTop: 5, diff --git a/lib/widgets/shared/text_fields/app-textfield-custom.dart b/lib/widgets/shared/text_fields/app-textfield-custom.dart index ead95795..da3ee466 100644 --- a/lib/widgets/shared/text_fields/app-textfield-custom.dart +++ b/lib/widgets/shared/text_fields/app-textfield-custom.dart @@ -32,7 +32,7 @@ class AppTextFieldCustom extends StatefulWidget { final bool focus; ///TODO Rename it to isCustomSearchablFiels - final bool hasHintmargin; + final bool isSearchTextField; AppTextFieldCustom({ this.height = 0, @@ -54,7 +54,7 @@ class AppTextFieldCustom extends StatefulWidget { this.isPrscription = false, this.isSecure = false, this.focus = false, - this.hasHintmargin = false, + this.isSearchTextField = false, this.onFieldSubmitted, }); @@ -116,7 +116,7 @@ class _AppTextFieldCustomState extends State { Expanded( child: Container( padding: widget.dropDownText == null - ? widget.hasHintmargin + ? widget.isSearchTextField ? EdgeInsets.only(top: 10) : EdgeInsets.symmetric(vertical: 0) : EdgeInsets.symmetric(vertical: 0), // 8.0 @@ -191,7 +191,7 @@ class _AppTextFieldCustomState extends State { ? widget.suffixIcon != null ? Container( margin: EdgeInsets.only( - bottom: widget.hasHintmargin + bottom: widget.isSearchTextField ? (widget.controller.text.isEmpty || widget.controller == null) ? 10 diff --git a/lib/widgets/shared/text_fields/AppTextFieldCustomerach.dart b/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart similarity index 93% rename from lib/widgets/shared/text_fields/AppTextFieldCustomerach.dart rename to lib/widgets/shared/text_fields/app_text_field_custom_serach.dart index 9251f2e8..2a5304e2 100644 --- a/lib/widgets/shared/text_fields/AppTextFieldCustomerach.dart +++ b/lib/widgets/shared/text_fields/app_text_field_custom_serach.dart @@ -5,8 +5,8 @@ import 'package:flutter/services.dart'; import 'app-textfield-custom.dart'; -class AppTextFieldCustomSerach extends StatelessWidget { - const AppTextFieldCustomSerach({ +class AppTextFieldCustomSearch extends StatelessWidget { + const AppTextFieldCustomSearch({ Key key, this.onChangeFun, this.positionedChild, @@ -43,7 +43,7 @@ class AppTextFieldCustomSerach extends StatelessWidget { hintText: hintText ?? TranslationBase.of(context).searchPatientName, isTextFieldHasSuffix: true, - hasHintmargin: true, + isSearchTextField: true, inputFormatters: inputFormatters, suffixIcon: suffixIcon ?? IconButton(