From 6a14214a0f84af9838808246c72334fbd43c4d59 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Wed, 25 Nov 2020 17:22:40 +0300 Subject: [PATCH 1/5] no message --- lib/pages/login/confirm-login.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 229e0a0f..ba68b8f5 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -370,7 +370,7 @@ class _ConfirmLogin extends State { if (authenticated == true) { - if(user.logInType==2 || user.logInType ==3){ + if(user !=null && user.logInType==2 || user.logInType ==3){ this.checkActivationCode(); }else{ var request = this.getCommonRequest(type: type); From 1b678e0aca44ab588da2fd9fd1ded06949e71995 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Wed, 25 Nov 2020 17:52:57 +0300 Subject: [PATCH 2/5] fingerprint --- lib/config/config.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 58ade1bc..2592d1b2 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -7,8 +7,8 @@ import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; const MAX_SMALL_SCREEN = 660; -const BASE_URL = 'https://uat.hmgwebservices.com/'; - //const BASE_URL = 'https://hmgwebservices.com/'; +//const BASE_URL = 'https://uat.hmgwebservices.com/'; + const BASE_URL = 'https://hmgwebservices.com/'; const GET_PROJECT = 'Services/Lists.svc/REST/GetProject'; ///Doctor From 7c33c06c0cb826952f5302a13445cd918287f6f4 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Wed, 25 Nov 2020 17:53:22 +0300 Subject: [PATCH 3/5] fingerprint --- lib/pages/landing/landing_page.dart | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 8d522b1d..3f64afa3 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -147,7 +147,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { _firebaseMessaging.getToken().then((String token) { sharedPref.setString(PUSH_TOKEN, token); - if (token != null && DEVICE_TOKEN == "") { + if (token != null) { DEVICE_TOKEN = token; checkUserStatus(token); } @@ -410,9 +410,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { SETTINGS, ); else - Navigator.of(context).pushNamed( - WELCOME_LOGIN, - ); + login(); }, //do something, ) ], @@ -553,4 +551,15 @@ class _LandingPageState extends State with WidgetsBindingObserver { _changeCurrentTab(2); } } + login() async { + var data = await sharedPref.getObject(IMEI_USER_DATA); + sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); + if (data != null) { + Navigator.of(context).pushNamed(CONFIRM_LOGIN); + } else { + Navigator.of(context).pushNamed( + WELCOME_LOGIN, + ); + } + } } From d6a0188c760a56c0423590e422f5e9f8f8b707f7 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Wed, 25 Nov 2020 17:53:45 +0300 Subject: [PATCH 4/5] fingerprint --- lib/pages/login/confirm-login.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index ba68b8f5..87eaf1ce 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -370,7 +370,7 @@ class _ConfirmLogin extends State { if (authenticated == true) { - if(user !=null && user.logInType==2 || user.logInType ==3){ + if(user !=null && (user.logInType==2 || user.logInType ==3)){ this.checkActivationCode(); }else{ var request = this.getCommonRequest(type: type); From 5bb780c4ac83316abcaeccb8b7b8b84291cf3520 Mon Sep 17 00:00:00 2001 From: Sultan Khan Date: Thu, 26 Nov 2020 09:43:51 +0300 Subject: [PATCH 5/5] push --- lib/pages/landing/landing_page.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 3f64afa3..826c8b76 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -145,9 +145,9 @@ class _LandingPageState extends State with WidgetsBindingObserver { _firebaseMessaging.requestNotificationPermissions(); } - _firebaseMessaging.getToken().then((String token) { + _firebaseMessaging.getToken().then((String token) async { sharedPref.setString(PUSH_TOKEN, token); - if (token != null) { + if (token != null && await sharedPref.getObject(USER_PROFILE) ==null) { DEVICE_TOKEN = token; checkUserStatus(token); }