From d4f01c19f7f31bf9812c6a409f8057a590cd47c2 Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Tue, 26 Apr 2022 11:03:29 +0300 Subject: [PATCH] session management update --- lib/client/base_app_client.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 5ccacfc1..94e7ca41 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -176,6 +176,14 @@ class BaseAppClient { }; String token = await sharedPref.getString(TOKEN); + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + + if (profile != null) { + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); + if (body['DoctorID'] == null) { + body['DoctorID'] = doctorProfile?.doctorID; + } + } var languageID = await sharedPref.getStringWithDefaultValue(APP_Language, 'en'); body['SetupID'] = body.containsKey('SetupID')