From 27a3dd1eb485701a3e4823ce5bdd2dad4ac34ac2 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Fri, 30 Apr 2021 13:23:59 +0300 Subject: [PATCH 1/2] fix the filter page --- lib/client/base_app_client.dart | 2 +- .../viewModel/PatientSearchViewModel.dart | 3 +- lib/core/viewModel/base_view_model.dart | 14 +- .../out_patient/filter_date_page.dart | 5 + .../out_patient/out_patient_screen.dart | 10 +- .../patient_profile_screen.dart | 2 + ...ent-profile-header-new-design-app-bar.dart | 13 +- ..._key_checkbox_search_allergies_widget.dart | 597 +++++++++--------- 8 files changed, 338 insertions(+), 308 deletions(-) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 177b95ee..83dfad00 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -71,7 +71,7 @@ class BaseAppClient { (body['ProjectID'] == 2 || body['ProjectID'] == 3)) { body['PatientOutSA'] = true; } - + body['DeviceTypeID'] = Platform.isAndroid ? 1 : 2; print("URL : $url"); print("Body : ${json.encode(body)}"); var asd = json.encode(body); diff --git a/lib/core/viewModel/PatientSearchViewModel.dart b/lib/core/viewModel/PatientSearchViewModel.dart index 7fbd7d1f..8192b1a8 100644 --- a/lib/core/viewModel/PatientSearchViewModel.dart +++ b/lib/core/viewModel/PatientSearchViewModel.dart @@ -49,7 +49,8 @@ class PatientSearchViewModel extends BaseViewModel{ } else { setState(ViewState.Busy); } - + await getDoctorProfile(isGetProfile: true); + patientSearchRequestModel.doctorID = doctorProfile.doctorID; await _outPatientService.getOutPatient( patientSearchRequestModel); if (_outPatientService.hasError) { diff --git a/lib/core/viewModel/base_view_model.dart b/lib/core/viewModel/base_view_model.dart index d8591660..43e83c9b 100644 --- a/lib/core/viewModel/base_view_model.dart +++ b/lib/core/viewModel/base_view_model.dart @@ -22,7 +22,17 @@ class BaseViewModel extends ChangeNotifier { notifyListeners(); } - Future getDoctorProfile() async { + Future getDoctorProfile({bool isGetProfile = false}) async { + if(isGetProfile) + { + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + if (profile != null) { + doctorProfile = DoctorProfileModel.fromJson(profile); + if (doctorProfile != null) { + return doctorProfile; + } + } + } if (doctorProfile == null) { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); if (profile != null) { @@ -35,5 +45,5 @@ class BaseViewModel extends ChangeNotifier { } else { return doctorProfile; } - } +} } diff --git a/lib/screens/patients/out_patient/filter_date_page.dart b/lib/screens/patients/out_patient/filter_date_page.dart index 193c1ec2..e4f28ac7 100644 --- a/lib/screens/patients/out_patient/filter_date_page.dart +++ b/lib/screens/patients/out_patient/filter_date_page.dart @@ -240,6 +240,11 @@ class _FilterDatePageState extends State { if (isFromDate) { setState(() { this.widget.patientSearchViewModel.selectedFromDate = picked; + var date = picked.add(Duration(days: 30)); + if(date.isBefore(lastDate)){ + this.widget.patientSearchViewModel.selectedToDate = date; + }else + this.widget.patientSearchViewModel.selectedToDate = lastDate; }); } else { setState(() { diff --git a/lib/screens/patients/out_patient/out_patient_screen.dart b/lib/screens/patients/out_patient/out_patient_screen.dart index 953e7722..4d0ce94a 100644 --- a/lib/screens/patients/out_patient/out_patient_screen.dart +++ b/lib/screens/patients/out_patient/out_patient_screen.dart @@ -132,7 +132,10 @@ class _OutPatientsScreenState extends State { setState(() { _activeLocation = _times.indexOf(item); outPatientFilterType= _activeLocation==0?OutPatientFilterType.Previous:_activeLocation==0?OutPatientFilterType.Today:OutPatientFilterType.NextWeek; + _controller.text=""; }); + model.searchData(""); + FocusScope.of(context).requestFocus(new FocusNode()); GifLoaderDialogUtils.showMyDialog(context); await model.getPatientBasedOnDate(item: item, selectedPatientType: widget.selectedPatientType, @@ -222,6 +225,7 @@ class _OutPatientsScreenState extends State { SizedBox( height: 10.0, ), + Expanded( child: Container( child: model.filterData.isEmpty @@ -236,7 +240,9 @@ class _OutPatientsScreenState extends State { shrinkWrap: true, itemCount: model.filterData.length, itemBuilder: (BuildContext ctxt, int index) { - return Padding( + if(_activeLocation !=0 || (model.filterData[index].patientStatusType !=null && model.filterData[index].patientStatusType==43)) + return + Padding( padding: EdgeInsets.all(8.0), child: PatientCard( patientInfo: model.filterData[index], @@ -264,6 +270,8 @@ class _OutPatientsScreenState extends State { // isFromSearch: widget.isSearch, ), ); + else + return SizedBox(); })), ), ], diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index 44641b4b..aa2b5276 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -94,6 +94,7 @@ class _PatientProfileScreenState extends State Column( children: [ PatientProfileHeaderNewDesignAppBar( + patient, arrivalType ?? '0', patientType, @@ -104,6 +105,7 @@ class _PatientProfileScreenState extends State : isDischargedPatient ? 240 : 0, + isDischargedPatient:isDischargedPatient ), Container( height: !isSearchAndOut 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 0ba5c8f2..3d7638c2 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 @@ -18,9 +18,10 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget final String arrivalType; final double height; final bool isInpatient; + final bool isDischargedPatient; PatientProfileHeaderNewDesignAppBar( - this.patient, this.patientType, this.arrivalType, {this.height = 0.0, this.isInpatient=false}); + this.patient, this.patientType, this.arrivalType, {this.height = 0.0, this.isInpatient=false, this.isDischargedPatient=false}); @override Widget build(BuildContext context) { @@ -302,10 +303,16 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget "${TranslationBase.of(context).numOfDays}: ", fontSize: 15, ), + if(isDischargedPatient) AppText( - "${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", + "${DateUtils.getDateTimeFromServerFormat(patient.dischargeDate).difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", fontSize: 15, - fontWeight: FontWeight.w700), + fontWeight: FontWeight.w700) + else + AppText( + "${DateTime.now().difference(DateUtils.getDateTimeFromServerFormat(patient.admissionDate)).inDays + 1}", + fontSize: 15, + fontWeight: FontWeight.w700), ], ), ], diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart index e91236e8..7a1fc3f5 100644 --- a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -62,119 +62,91 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); return Container( - child: Expanded( - child: Column( - children: [ - Expanded( - child: Container( - height: MediaQuery.of(context).size.height * 0.70, - child: Center( - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.white), - child: Column( - children: [ - AppTextFieldCustom( - // height: - // MediaQuery.of(context).size.height * 0.070, - hintText: - TranslationBase.of(context).selectAllergy, - isTextFieldHasSuffix: true, - hasBorder: false, - // controller: filteredSearchController, - onChanged: (value) { - filterSearchResults(value); - }, - suffixIcon: IconButton( - icon: Icon( - Icons.search, - color: Colors.black, - )), - ), - DividerWithSpacesAround(), - SizedBox( - height: 10, - ), - Expanded( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Container( - height: - MediaQuery.of(context).size.height * 0.60, - child: ListView.builder( - itemCount: items.length, - itemBuilder: (context, index) { - bool isSelected = widget - .isServiceSelected(items[index]); - MySelectedAllergy mySelectedAllergy; - if (isSelected) { - mySelectedAllergy = - widget.getServiceSelectedAllergy( - items[index]); - } - TextEditingController remarkController = - TextEditingController( - text: isSelected - ? mySelectedAllergy.remark - : null); - TextEditingController severityController = - TextEditingController( - text: isSelected - ? mySelectedAllergy - .selectedAllergySeverity != - null - ? projectViewModel - .isArabic - ? mySelectedAllergy - .selectedAllergySeverity - .nameAr - : mySelectedAllergy - .selectedAllergySeverity - .nameEn - : null - : null); - return HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Checkbox( - value: widget - .isServiceSelected( - items[index]), - activeColor: - Colors.red[800], - onChanged: (bool newValue) { - setState(() { - if (widget - .isServiceSelected( - items[index])) { - widget.removeAllergy( - items[index]); - } else { - MySelectedAllergy - mySelectedAllergy = - new MySelectedAllergy( - selectedAllergy: - items[ - index], - selectedAllergySeverity: - _selectedAllergySeverity, - remark: null, - isChecked: - true, - isExpanded: - true); - widget.addAllergy( - mySelectedAllergy); - } - }); - }), - InkWell( - onTap: () { + child: Column( + children: [ + Expanded( + child: Container( + height: MediaQuery.of(context).size.height * 0.70, + child: Center( + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + color: Colors.white), + child: Column( + children: [ + AppTextFieldCustom( + // height: + // MediaQuery.of(context).size.height * 0.070, + hintText: + TranslationBase.of(context).selectAllergy, + isTextFieldHasSuffix: true, + hasBorder: false, + // controller: filteredSearchController, + onChanged: (value) { + filterSearchResults(value); + }, + suffixIcon: IconButton( + icon: Icon( + Icons.search, + color: Colors.black, + )), + ), + DividerWithSpacesAround(), + SizedBox( + height: 10, + ), + Expanded( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Container( + height: + MediaQuery.of(context).size.height * 0.60, + child: ListView.builder( + itemCount: items.length, + itemBuilder: (context, index) { + bool isSelected = widget + .isServiceSelected(items[index]); + MySelectedAllergy mySelectedAllergy; + if (isSelected) { + mySelectedAllergy = + widget.getServiceSelectedAllergy( + items[index]); + } + TextEditingController remarkController = + TextEditingController( + text: isSelected + ? mySelectedAllergy.remark + : null); + TextEditingController severityController = + TextEditingController( + text: isSelected + ? mySelectedAllergy + .selectedAllergySeverity != + null + ? projectViewModel + .isArabic + ? mySelectedAllergy + .selectedAllergySeverity + .nameAr + : mySelectedAllergy + .selectedAllergySeverity + .nameEn + : null + : null); + return HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + Checkbox( + value: widget + .isServiceSelected( + items[index]), + activeColor: + Colors.red[800], + onChanged: (bool newValue) { setState(() { if (widget .isServiceSelected( @@ -182,9 +154,8 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState widget.removeAllergy( items[index]); } else { - // TODO add Allergy - - MySelectedAllergy mySelectedAllergy = + MySelectedAllergy + mySelectedAllergy = new MySelectedAllergy( selectedAllergy: items[ @@ -192,208 +163,234 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState selectedAllergySeverity: _selectedAllergySeverity, remark: null, - isChecked: true, + isChecked: + true, isExpanded: true); widget.addAllergy( mySelectedAllergy); } }); - }, - child: Padding( - padding: const EdgeInsets - .symmetric( - horizontal: 10, - vertical: 0), - child: Container( - child: AppText( - projectViewModel - .isArabic - ? items[index] - .nameAr != - "" - ? items[index] - .nameAr - : items[index] - .nameEn - : items[index] - .nameEn, - color: - Color(0xFF575757), - fontSize: 16, - fontWeight: - FontWeight.w600, - ), - width: - MediaQuery.of(context) - .size - .width * - 0.55, - ), - ), - ), - ], - ), - InkWell( + }), + InkWell( onTap: () { - if (mySelectedAllergy != - null) { - setState(() { - mySelectedAllergy - .isExpanded = - mySelectedAllergy - .isExpanded - ? false - : true; - }); - } + setState(() { + if (widget + .isServiceSelected( + items[index])) { + widget.removeAllergy( + items[index]); + } else { + + MySelectedAllergy mySelectedAllergy = + new MySelectedAllergy( + selectedAllergy: + items[ + index], + selectedAllergySeverity: + _selectedAllergySeverity, + remark: null, + isChecked: true, + isExpanded: + true); + widget.addAllergy( + mySelectedAllergy); + } + }); }, - child: Icon((mySelectedAllergy != - null - ? mySelectedAllergy - .isExpanded - : false) - ? EvaIcons - .arrowIosUpwardOutline - : EvaIcons - .arrowIosDownwardOutline)) - ], - ), - bodyWidget: Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Center( - child: Column( - children: [ - AppTextFieldCustom( - onClick: widget.model - .allergySeverityList != - null - ? () { - MasterKeyDailog - dialog = - MasterKeyDailog( - list: widget.model - .allergySeverityList, - okText: - TranslationBase.of( - context) - .ok, - okFunction: - (selectedValue) { - setState(() { - mySelectedAllergy - .selectedAllergySeverity = - selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: - false, - context: context, - builder: - (BuildContext - context) { - return dialog; - }, - ); - } - : null, - isTextFieldHasSuffix: true, - hintText: - TranslationBase.of( - context) - .selectSeverity, - enabled: false, - maxLines: 2, - minLines: 2, - controller: - severityController, - ), - SizedBox( - height: 5, - ), - if (isSubmitted && - mySelectedAllergy != - null && - mySelectedAllergy - .selectedAllergySeverity == - null) - Row( - children: [ - CustomValidationError(), - ], - mainAxisAlignment: - MainAxisAlignment - .start, + child: Padding( + padding: const EdgeInsets + .symmetric( + horizontal: 10, + vertical: 0), + child: Container( + child: AppText( + projectViewModel + .isArabic + ? items[index] + .nameAr != + "" + ? items[index] + .nameAr + : items[index] + .nameEn + : items[index] + .nameEn, + color: + Color(0xFF575757), + fontSize: 16, + fontWeight: + FontWeight.w600, ), - SizedBox( - height: 10, - ), - Container( - margin: EdgeInsets.only( - left: 0, - right: 0, - top: 15), - child: NewTextFields( - hintText: - TranslationBase.of( - context) - .remarks, - fontSize: 13.5, - // hintColor: Colors.black, - fontWeight: - FontWeight.w600, - maxLines: 25, - minLines: 3, - initialValue: isSelected - ? mySelectedAllergy - .remark - : '', - // controller: remarkControlle - - onChanged: (value) { - if (isSelected) { - mySelectedAllergy - .remark = value; - } - }, - validator: (value) { - if (value == null) - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 10, + width: + MediaQuery.of(context) + .size + .width * + 0.55, ), - ], + ), ), + ], + ), + InkWell( + onTap: () { + if (mySelectedAllergy != + null) { + setState(() { + mySelectedAllergy + .isExpanded = + mySelectedAllergy + .isExpanded + ? false + : true; + }); + } + }, + child: Icon((mySelectedAllergy != + null + ? mySelectedAllergy + .isExpanded + : false) + ? EvaIcons + .arrowIosUpwardOutline + : EvaIcons + .arrowIosDownwardOutline)) + ], + ), + bodyWidget: Center( + child: FractionallySizedBox( + widthFactor: 0.9, + child: Center( + child: Column( + children: [ + AppTextFieldCustom( + onClick: widget.model + .allergySeverityList != + null + ? () { + MasterKeyDailog + dialog = + MasterKeyDailog( + list: widget.model + .allergySeverityList, + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + mySelectedAllergy + .selectedAllergySeverity = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: + (BuildContext + context) { + return dialog; + }, + ); + } + : null, + isTextFieldHasSuffix: true, + hintText: + TranslationBase.of( + context) + .selectSeverity, + enabled: false, + maxLines: 2, + minLines: 2, + controller: + severityController, + ), + SizedBox( + height: 5, + ), + if (isSubmitted && + mySelectedAllergy != + null && + mySelectedAllergy + .selectedAllergySeverity == + null) + Row( + children: [ + CustomValidationError(), + ], + mainAxisAlignment: + MainAxisAlignment + .start, + ), + SizedBox( + height: 10, + ), + Container( + margin: EdgeInsets.only( + left: 0, + right: 0, + top: 15), + child: NewTextFields( + hintText: + TranslationBase.of( + context) + .remarks, + fontSize: 13.5, + // hintColor: Colors.black, + fontWeight: + FontWeight.w600, + maxLines: 25, + minLines: 3, + initialValue: isSelected + ? mySelectedAllergy + .remark + : '', + // controller: remarkControlle + + onChanged: (value) { + if (isSelected) { + mySelectedAllergy + .remark = value; + } + }, + validator: (value) { + if (value == null) + return TranslationBase + .of(context) + .emptyMessage; + else + return null; + }), + ), + SizedBox( + height: 10, + ), + ], ), ), ), - isExpand: mySelectedAllergy != null - ? mySelectedAllergy.isExpanded - : false, - ); - }, - ), + ), + isExpand: mySelectedAllergy != null + ? mySelectedAllergy.isExpanded + : false, + ); + }, ), ), ), - ], - ))), - ), - ), - SizedBox( - height: 10, + ), + ], + ))), ), - ], - ), + ), + SizedBox( + height: 10, + ), + ], ), ); } From 2978aeecb24b8f9085a399f4618aedefe1a1a05b Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Fri, 30 Apr 2021 13:44:27 +0300 Subject: [PATCH 2/2] fix the tab bar --- .../referral/patient_referral_screen.dart | 88 +++++++++++++++---- 1 file changed, 69 insertions(+), 19 deletions(-) diff --git a/lib/screens/patients/profile/referral/patient_referral_screen.dart b/lib/screens/patients/profile/referral/patient_referral_screen.dart index 1206c9c3..6b7f448b 100644 --- a/lib/screens/patients/profile/referral/patient_referral_screen.dart +++ b/lib/screens/patients/profile/referral/patient_referral_screen.dart @@ -1,9 +1,11 @@ import 'dart:ui'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/screens/patients/profile/referral/referred-patient-screen.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/text_fields_utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -14,13 +16,22 @@ class PatientReferralScreen extends StatefulWidget { _PatientReferralScreen createState() => _PatientReferralScreen(); } -class _PatientReferralScreen extends State - with SingleTickerProviderStateMixin { +class _PatientReferralScreen extends State with SingleTickerProviderStateMixin { + TabController _tabController; + int index=0; + @override void initState() { super.initState(); _tabController = TabController(length: 2, vsync: this); + _tabController.addListener(_handleTabSelection); + } + + _handleTabSelection() { + setState(() { + index = _tabController.index; + }); } @override @@ -29,7 +40,7 @@ class _PatientReferralScreen extends State _tabController.dispose(); } - @override + @override Widget build(BuildContext context) { return AppScaffold( @@ -39,12 +50,10 @@ class _PatientReferralScreen extends State extendBodyBehindAppBar: true, // backgroundColor: Colors.white, appBar: PreferredSize( - preferredSize: Size.fromHeight(60.0), + preferredSize: Size.fromHeight(MediaQuery.of(context).size.height * 0.070), child: Center( child: Container( - height: 60.0, - // margin: EdgeInsets.only(top: 10.0), - width: MediaQuery.of(context).size.width * 1, // 0.92, + height: MediaQuery.of(context).size.height * 0.070, decoration: BoxDecoration( border: Border( bottom: BorderSide( @@ -54,30 +63,71 @@ class _PatientReferralScreen extends State color: Colors.white), child: Center( child: TabBar( - isScrollable: true, + isScrollable: false, controller: _tabController, - indicatorColor: Colors.red[800], - indicatorWeight: 5.0, + indicatorColor: Colors.transparent, + indicatorWeight: 1.0, indicatorSize: TabBarIndicatorSize.tab, + labelColor: Theme.of(context).primaryColor, - labelPadding: - EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0), + labelPadding: EdgeInsets.only(top: 0, left:0, right: 0,bottom: 0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( - width: MediaQuery.of(context).size.width * 0.30, + width: MediaQuery.of(context).size.width * 0.50, + height: MediaQuery.of(context).size.height * 0.070, + decoration: TextFieldsUtils.containerBorderDecoration( + Color(0Xffffffff), Color(0xFFCCCCCC), + borderRadius: 4, borderWidth: 0), child: Center( - child: - AppText(TranslationBase.of(context).referral), + child: Container( + height: MediaQuery.of(context).size.height * 0.070, + decoration: TextFieldsUtils.containerBorderDecoration( + index == 0 + ? Color(0xFFD02127 ) + : Color(0xFFEAEAEA), + index == 0 ? Color(0xFFD02127) : Color(0xFFEAEAEA), + borderRadius: 4, + borderWidth: 0), + child: Center( + child: AppText( + TranslationBase.of(context).myReferredPatient, + fontSize: SizeConfig.textMultiplier * 1.8, + color: index == 0 ? Colors.white : Color(0xFF2B353E), + fontWeight: FontWeight.w700, + ), + ), + ), ), ), Container( - width: MediaQuery.of(context).size.width * 0.30, + width: MediaQuery.of(context).size.width * 0.50, + height: MediaQuery.of(context).size.height * 0.070, + decoration: TextFieldsUtils.containerBorderDecoration( + Color(0Xffffffff), Color(0xFFCCCCCC), + borderRadius: 4, borderWidth: 0), child: Center( - child: AppText( - TranslationBase.of(context).myReferredPatient), + child: Container( + height: MediaQuery.of(context).size.height * 0.070, + decoration: TextFieldsUtils.containerBorderDecoration( + index == 1 + ? Color(0xFFD02127 ) + : Color(0xFFEAEAEA), + index == 1 ? Color(0xFFD02127) : Color(0xFFEAEAEA), + borderRadius: 4, + borderWidth: 0), + child: Center( + child: AppText( + TranslationBase.of(context).referral, + fontSize: SizeConfig.textMultiplier * 1.8, + color: index == 1 ? Colors.white : Color(0xFF2B353E), + fontWeight: FontWeight.w700, + ), + ), + ), ), ), + ], ), ), @@ -91,8 +141,8 @@ class _PatientReferralScreen extends State physics: BouncingScrollPhysics(), controller: _tabController, children: [ - MyReferralInPatientScreen(), ReferredPatientScreen(), + MyReferralInPatientScreen(), // MyReferredPatient(), ], ),