diff --git a/lib/core/viewModel/PatientSearchViewModel.dart b/lib/core/viewModel/PatientSearchViewModel.dart index 3c8d7180..4c7af679 100644 --- a/lib/core/viewModel/PatientSearchViewModel.dart +++ b/lib/core/viewModel/PatientSearchViewModel.dart @@ -91,6 +91,7 @@ class PatientSearchViewModel extends BaseViewModel { bool isSearchWithKeyInfo}) async { String dateTo; String dateFrom; + // TODO Fix this in Arabic if (item == 'Previous') { selectedFromDate = DateTime( DateTime.now().year, DateTime.now().month - 1, DateTime.now().day); diff --git a/lib/screens/patients/out_patient/out_patient_screen.dart b/lib/screens/patients/out_patient/out_patient_screen.dart index e2e6e94c..f9e4bfd7 100644 --- a/lib/screens/patients/out_patient/out_patient_screen.dart +++ b/lib/screens/patients/out_patient/out_patient_screen.dart @@ -1,6 +1,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/filter_type.dart'; import 'package:doctor_app_flutter/core/enum/patient_type.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/model/PatientSearchRequestModel.dart'; import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart'; import 'package:doctor_app_flutter/core/viewModel/auth_view_model.dart'; @@ -164,7 +165,7 @@ class _OutPatientsScreenState extends State { color: _isActive ? Colors.white : Color(0xFF2B353E), fontWeight: FontWeight.w700, ), - _isActive&&_activeLocation!=0 ?Container( + _isActive&&_activeLocation!=0&&model.state == ViewState.Idle ?Container( padding: EdgeInsets.all(2), margin: EdgeInsets.symmetric(horizontal: 5), decoration: diff --git a/lib/widgets/shared/text_fields/app-textfield-custom.dart b/lib/widgets/shared/text_fields/app-textfield-custom.dart index 12eaaa7c..da92f574 100644 --- a/lib/widgets/shared/text_fields/app-textfield-custom.dart +++ b/lib/widgets/shared/text_fields/app-textfield-custom.dart @@ -37,7 +37,7 @@ class AppTextFieldCustom extends StatefulWidget { this.suffixIcon, this.dropDownColor, this.enabled = true, - this.inputType = TextInputType.text, + this.inputType, this.minLines = 1, this.maxLines = 1, this.inputFormatters, @@ -106,7 +106,7 @@ class _AppTextFieldCustomState extends State { color: Color(0xFF575757), ), controller: widget.controller, - keyboardType: widget.inputType, + keyboardType: widget.inputType?? (widget.maxLines == 1 ? TextInputType.text : TextInputType.multiline), enabled: widget.enabled, minLines: widget.minLines, maxLines: widget.maxLines,