Merge pull request 'silent login case handled.' (#106) from dev_sultan into master

Reviewed-on: https://34.17.182.140/Haroon6138/HMG_Patient_App_New/pulls/106
pull/110/head
Haroon6138 1 month ago
commit de0227dd57

@ -710,7 +710,7 @@ var GET_PRESCRIPTION_INSTRUCTIONS_PDF = 'Services/ChatBot_Service.svc/REST/Chatb
class ApiConsts { class ApiConsts {
static const maxSmallScreen = 660; static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT

@ -265,6 +265,12 @@ class AuthenticationRepoImp implements AuthenticationRepo {
newRequest.isDentalAllowedBackend = false; newRequest.isDentalAllowedBackend = false;
newRequest.forRegisteration = newRequest.isRegister ?? false; newRequest.forRegisteration = newRequest.isRegister ?? false;
newRequest.isRegister = false; newRequest.isRegister = false;
//silent login case removed token and login token
if(newRequest.logInTokenID.isEmpty && newRequest.isSilentLogin == true) {
newRequest.logInTokenID = null;
newRequest.deviceToken = null;
}
} }
Map<String, dynamic> familyRequest = {}; Map<String, dynamic> familyRequest = {};

@ -47,7 +47,9 @@ class _NewReferralPageState extends State<NewReferralPage> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_loadData(); WidgetsBinding.instance.addPostFrameCallback((_) {
_loadData();
});
} }
void _handleNextStep() { void _handleNextStep() {
@ -144,6 +146,9 @@ class _NewReferralPageState extends State<NewReferralPage> {
} }
void _loadData() { void _loadData() {
final authVM = context.read<AuthenticationViewModel>(); final authVM = context.read<AuthenticationViewModel>();
final habibWalletVM = context.read<HabibWalletViewModel>(); final habibWalletVM = context.read<HabibWalletViewModel>();
final hmgServicesVM = context.read<HmgServicesViewModel>(); final hmgServicesVM = context.read<HmgServicesViewModel>();

Loading…
Cancel
Save