From 8980f6f440e9c9f9d96779777621e286b723d051 Mon Sep 17 00:00:00 2001 From: RoaaGhali98 Date: Tue, 1 Mar 2022 16:10:42 +0200 Subject: [PATCH] replace the TabBar in refer-patient-screen-in-patient with our dropDownList --- .../refer-patient-screen-in-patient.dart | 92 +------------------ 1 file changed, 4 insertions(+), 88 deletions(-) diff --git a/lib/screens/patients/profile/referral/refer_details/refer-patient-screen-in-patient.dart b/lib/screens/patients/profile/referral/refer_details/refer-patient-screen-in-patient.dart index 90dc98e5..a3306116 100644 --- a/lib/screens/patients/profile/referral/refer_details/refer-patient-screen-in-patient.dart +++ b/lib/screens/patients/profile/referral/refer_details/refer-patient-screen-in-patient.dart @@ -3,14 +3,12 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/viewModel/patient-referral-viewmodel.dart'; -import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.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/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart'; import 'package:doctor_app_flutter/utils/date-utils.dart'; import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart'; -import 'package:doctor_app_flutter/utils/tab_utils.dart'; import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/app_bar/patient-profile-app-bar.dart'; import 'package:doctor_app_flutter/widgets/patients/patient_service_title.dart'; @@ -25,7 +23,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:intl/intl.dart'; import 'package:permission_handler/permission_handler.dart'; -import 'package:provider/provider.dart'; import 'package:speech_to_text/speech_recognition_error.dart'; import 'package:speech_to_text/speech_to_text.dart' as stt; @@ -35,9 +32,7 @@ class PatientMakeInPatientReferralScreen extends StatefulWidget { _PatientMakeInPatientReferralScreenState(); } -class _PatientMakeInPatientReferralScreenState extends State with SingleTickerProviderStateMixin{ - TabController _tabController; - int index = 0; +class _PatientMakeInPatientReferralScreenState extends State{ PatiantInformtion patient; List referToList; dynamic _referTo; @@ -50,7 +45,6 @@ class _PatientMakeInPatientReferralScreenState extends State _priorityList = List(); - _priorityList.add( - priority1,); - _priorityList.add( - priority2,); - _priorityList.add( - priority3,); + _priorityList.add(priority1); + _priorityList.add(priority2); + _priorityList.add(priority3); final routeArgs = ModalRoute.of(context).settings.arguments as Map; @@ -652,67 +629,6 @@ class _PatientMakeInPatientReferralScreenState extends State(context); - return Center( - child: Container( - width: SizeConfig.widthMultiplier * 120, - height: TabHelper.getTabHeight(context), - color: TabHelper.getBgTabColor(), - child: Center( - child: TabBar( - isScrollable: false, - controller: _tabController, - indicatorColor: Colors.transparent, - indicatorWeight: 1.0, - indicatorSize: TabBarIndicatorSize.tab, - labelColor: Theme.of(context).primaryColor, - labelPadding: - EdgeInsets.only(top: 0, left: 0, right: 0, bottom: 0), - unselectedLabelColor: Colors.grey[800], - tabs: [ - Container( - decoration: TabHelper.getBoxTabsBoxDecoration( - isActive: index == 0, - isFirst: true, - projectViewModel: projectsProvider), - child: Center( - child: TabHelper.getTabText( - title: TranslationBase.of(context).veryUrgent.toUpperCase(), - isActive: index == 0)), - ), - Center( - child: Container( - decoration: TabHelper.getBoxTabsBoxDecoration( - isActive: index == 1, - isMiddle: true, - projectViewModel: projectsProvider), - child: Center( - child: TabHelper.getTabText( - title: TranslationBase.of(context).urgent.toUpperCase(), - isActive: index == 1)), - ), - ), - Center( - child: Container( - decoration: TabHelper.getBoxTabsBoxDecoration( - isActive: index == 2, - isLast: true, - projectViewModel: projectsProvider), - child: Center( - child: TabHelper.getTabText( - title: TranslationBase.of(context).routine.toUpperCase(), - isActive: index == 2), - ), - ), - ), - ], - ), - ), - ), - ); - } - String getPriority() { DateTime date = DateTime.now(); switch (_activePriority) {