From 583edfed89e57cf969dcfbd47d5695488fa1d43a Mon Sep 17 00:00:00 2001 From: Elham Rababah Date: Tue, 4 May 2021 11:54:54 +0300 Subject: [PATCH 1/2] fix out patient number --- lib/screens/patients/out_patient/out_patient_screen.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/screens/patients/out_patient/out_patient_screen.dart b/lib/screens/patients/out_patient/out_patient_screen.dart index 8d1d2eb8..c8d197de 100644 --- a/lib/screens/patients/out_patient/out_patient_screen.dart +++ b/lib/screens/patients/out_patient/out_patient_screen.dart @@ -132,7 +132,7 @@ class _OutPatientsScreenState extends State { onTap: () async { setState(() { _activeLocation = _times.indexOf(item); - outPatientFilterType= _activeLocation==0?OutPatientFilterType.Previous:_activeLocation==0?OutPatientFilterType.Today:OutPatientFilterType.NextWeek; + outPatientFilterType= _activeLocation==0?OutPatientFilterType.Previous:_activeLocation==1?OutPatientFilterType.Today:OutPatientFilterType.NextWeek; _controller.text=""; }); model.searchData(""); From 302294afada420888f4b926d2448e07de956bc81 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Tue, 4 May 2021 12:12:06 +0300 Subject: [PATCH 2/2] session issue fix --- lib/util/helpers.dart | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/util/helpers.dart b/lib/util/helpers.dart index 13b7b2ae..3e410c86 100644 --- a/lib/util/helpers.dart +++ b/lib/util/helpers.dart @@ -1,6 +1,7 @@ import 'package:connectivity/connectivity.dart'; import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/models/doctor/list_doctor_working_hours_table_model.dart'; import 'package:doctor_app_flutter/screens/auth/login_screen.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; @@ -16,6 +17,7 @@ import '../util/dr_app_toast_msg.dart'; import 'dr_app_shared_pref.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); + class Helpers { static int cupertinoPickerIndex = 0; @@ -82,7 +84,6 @@ class Helpers { style: TextStyle(fontSize: SizeConfig.textMultiplier * 2), ); }).toList(), - itemExtent: 25, looping: false, onSelectedItemChanged: (int index) { @@ -100,6 +101,7 @@ class Helpers { DrAppToastMsg.showErrorToast(localMsg); } + static Future checkConnection() async { ConnectivityResult connectivityResult = await (Connectivity().checkConnectivity()); @@ -144,8 +146,13 @@ class Helpers { String lang = await sharedPref.getString(APP_Language); await clearSharedPref(); sharedPref.setString(APP_Language, lang); - Navigator.pushAndRemoveUntil(AppGlobal.CONTEX, FadePage(page: Loginsreen(),), (r) => false); - + ProjectViewModel().isLogin = false; + Navigator.pushAndRemoveUntil( + AppGlobal.CONTEX, + FadePage( + page: Loginsreen(), + ), + (r) => false); } navigateToUpdatePage(String message, String androidLink, iosLink) { @@ -158,7 +165,7 @@ class Helpers { iosLink: iosLink, ), ), - (r) => false); + (r) => false); } static String parseHtmlString(String htmlString) {