From e9d35d833328d7a7920946733f6de53b244a0128 Mon Sep 17 00:00:00 2001 From: Aamir Muhammad Date: Wed, 9 Jul 2025 10:12:23 +0300 Subject: [PATCH] login using sms done --- lib/pages/landing/landing_page.dart | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 4bf1e44f..44285892 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -654,10 +654,11 @@ class _LandingPageState extends State with WidgetsBindingObserver { authService.getDashboard().then((value) async { setState(() { if (value != null) { + notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); model.setState(model.count, model.ancillaryCount, true, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount); - // FlutterAppIconBadge.updateBadge(int.parse(notificationCount)); + checkLastLoginStatus(); } }); // if (await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN) == null || !await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN)) { @@ -703,4 +704,13 @@ class _LandingPageState extends State with WidgetsBindingObserver { void showUserConsent() { sharedPref.setString(IS_COVID_CONSENT_SHOWN, "true"); } + + checkLastLoginStatus() async{ + int lastLoginStatus = await sharedPref.getInt(LAST_LOGIN) != null ? await sharedPref.getInt(LAST_LOGIN) : 1; + + if(lastLoginStatus == 1 || lastLoginStatus == 2){ + print("SMS or Whatsapp Consent"); + } + + } }