login using sms done

updare-to-3.32.sultan
Aamir Muhammad 8 months ago
parent cb9e152c01
commit 00f1c46d02

@ -655,10 +655,11 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
authService.getDashboard().then((value) async { authService.getDashboard().then((value) async {
setState(() { setState(() {
if (value != null) { if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, model.ancillaryCount, true, notificationCount); model.setState(model.count, model.ancillaryCount, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, 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)) { // if (await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN) == null || !await AppSharedPreferences().getBool(IS_LAST_APPOINTMENT_RATE_SHOWN)) {
@ -704,4 +705,13 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
void showUserConsent() { void showUserConsent() {
sharedPref.setString(IS_COVID_CONSENT_SHOWN, "true"); 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");
}
}
} }

Loading…
Cancel
Save