From c07f84ff78202848fa4c83d54004b29032e5ca46 Mon Sep 17 00:00:00 2001 From: ibrahim albitar Date: Tue, 23 Jun 2020 16:10:05 +0300 Subject: [PATCH] fixing and enhancments --- lib/screens/medicine/medicine_search_screen.dart | 4 ++++ .../patients/profile/insurance_approvals_screen.dart | 5 ++++- lib/screens/patients/profile/patient_orders_screen.dart | 5 ++++- lib/screens/patients/profile/progress_note_screen.dart | 5 ++++- lib/widgets/shared/app_text_form_field.dart | 6 +++++- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/lib/screens/medicine/medicine_search_screen.dart b/lib/screens/medicine/medicine_search_screen.dart index 99bb44ca..5c8726d7 100644 --- a/lib/screens/medicine/medicine_search_screen.dart +++ b/lib/screens/medicine/medicine_search_screen.dart @@ -60,6 +60,10 @@ class _MedicineSearchState extends State { hintText: TranslationBase.of(context).searchMedicineNameHere, controller: myController, onSaved: (value) {}, + onFieldSubmitted: (value){ + searchMedicine(context); + }, + textInputAction: TextInputAction.search, inputFormatter: ONLY_LETTERS), ), Container( diff --git a/lib/screens/patients/profile/insurance_approvals_screen.dart b/lib/screens/patients/profile/insurance_approvals_screen.dart index 99db9a4f..a171a0e9 100644 --- a/lib/screens/patients/profile/insurance_approvals_screen.dart +++ b/lib/screens/patients/profile/insurance_approvals_screen.dart @@ -61,7 +61,9 @@ class _InsuranceApprovalsState extends State { patientTypeID: patient.patientType, languageID: 2); patientsProv - .getPatientInsuranceApprovals(insuranceApprovalsRequest.toJson()); + .getPatientInsuranceApprovals(insuranceApprovalsRequest.toJson()).then((c){ + approvalsList = patientsProv.insuranceApporvalsList; + }); } @override @@ -97,6 +99,7 @@ class _InsuranceApprovalsState extends State { onChanged: (String str) { this.searchData(str); }, + textInputAction: TextInputAction.done, decoration: buildInputDecoration( context, TranslationBase.of(context) diff --git a/lib/screens/patients/profile/patient_orders_screen.dart b/lib/screens/patients/profile/patient_orders_screen.dart index 78b3b294..8effd1f9 100644 --- a/lib/screens/patients/profile/patient_orders_screen.dart +++ b/lib/screens/patients/profile/patient_orders_screen.dart @@ -59,7 +59,9 @@ class _PatientsOrdersState extends State { tokenID: token, patientTypeID: patient.patientType, languageID: 2); - patientsProv.getPatientProgressNote(progressNoteRequest.toJson()); + patientsProv.getPatientProgressNote(progressNoteRequest.toJson()).then((c){ + notesList = patientsProv.patientProgressNoteList; + }); } @override @@ -94,6 +96,7 @@ class _PatientsOrdersState extends State { onChanged: (String str) { this.searchData(str); }, + textInputAction: TextInputAction.done, decoration: buildInputDecoration(context, TranslationBase.of(context).searchOrders), ), diff --git a/lib/screens/patients/profile/progress_note_screen.dart b/lib/screens/patients/profile/progress_note_screen.dart index a2aea154..90640c59 100644 --- a/lib/screens/patients/profile/progress_note_screen.dart +++ b/lib/screens/patients/profile/progress_note_screen.dart @@ -59,7 +59,9 @@ class _ProgressNoteState extends State { tokenID: token, patientTypeID: patient.patientType, languageID: 2); - patientsProv.getPatientProgressNote(progressNoteRequest.toJson()); + patientsProv.getPatientProgressNote(progressNoteRequest.toJson()).then((c){ + notesList = patientsProv.patientProgressNoteList; + }); } @override @@ -94,6 +96,7 @@ class _ProgressNoteState extends State { onChanged: (String str) { this.searchData(str); }, + textInputAction: TextInputAction.done, decoration: buildInputDecoration(context, TranslationBase.of(context).searchNote), ), diff --git a/lib/widgets/shared/app_text_form_field.dart b/lib/widgets/shared/app_text_form_field.dart index 06dfb9e7..b0b9a8ec 100644 --- a/lib/widgets/shared/app_text_form_field.dart +++ b/lib/widgets/shared/app_text_form_field.dart @@ -19,7 +19,9 @@ class AppTextFormField extends FormField { bool autovalidate = true, TextInputType textInputType, String hintText, - FocusNode focusNode + FocusNode focusNode, + TextInputAction textInputAction, + ValueChanged onFieldSubmitted, }) : super( onSaved: onSaved, validator: validator, @@ -34,6 +36,8 @@ class AppTextFormField extends FormField { onChanged: onChanged?? (value){ state.didChange(value); }, + textInputAction: textInputAction, + onFieldSubmitted: onFieldSubmitted, decoration: InputDecoration( hintText: hintText, hintStyle: TextStyle(fontSize: SizeConfig.textMultiplier * 2),