login loader issue fixed

dq_and_master
Sultan Khan 5 years ago
parent d5c5b7eaed
commit 9e3db622fa

@ -384,55 +384,34 @@ class _ConfirmLogin extends State<ConfirmLogin> {
} }
getMobileInfo(request) { getMobileInfo(request) {
GifLoaderDialogUtils.showMyDialog(context); // GifLoaderDialogUtils.showMyDialog(context);
this this.authService.getLoginInfo(request).then((result) {
.authService GifLoaderDialogUtils.hideDialog(context);
.getLoginInfo(request) if (result['SMSLoginRequired'] == false) {
.then((result) => { this.loginTokenID = result.logInTokenID;
GifLoaderDialogUtils.hideDialog(context), this.patientOutSA = result.patientOutSA;
if (result['SMSLoginRequired'] == false)
{
this.loginTokenID = result.logInTokenID,
this.patientOutSA = result.patientOutSA,
// sms for register the biometric // sms for register the biometric
if (result.isSMSSent) if (result.isSMSSent) {
{ this.onlySMSBox = false;
this.onlySMSBox = false,
//this.button(); //this.button();
} else {
checkActivationCode();
} }
else } else {
{checkActivationCode()} if (result['IsAuthenticated'] == true) {
}
else
{
if (result['IsAuthenticated'] == true)
{
setState(() { setState(() {
isMoreOption = true; isMoreOption = true;
this.onlySMSBox = true; this.onlySMSBox = true;
// this.fingrePrintBefore = true; // this.fingrePrintBefore = true;
}), });
//sharedPref.setBool(ONLY_SMS, true),
// this.cs.sharedService.setSharedData(true, AuthenticationService.ONLY_SMS);
//this.cs.sharedService.setSharedData(this.selectedOption, AuthenticationService.FINGUREPRINT_BEFORE);
// this.cs.confirmLogin();
//this.button();
} }
// else
// {
// // this.cs.presentAlert(result.ErrorEndUserMessage);
// }
} }
}) }).catchError((err) {
.catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
}); });
} }
setUser() async {}
setDefault() async { setDefault() async {
if (await sharedPref.getObject(IMEI_USER_DATA) != null) if (await sharedPref.getObject(IMEI_USER_DATA) != null)
user = SelectDeviceIMEIRES.fromJson( user = SelectDeviceIMEIRES.fromJson(

@ -64,7 +64,7 @@ class _AppDrawerState extends State<AppDrawer> {
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
children: <Widget>[ children: <Widget>[
Container( Container(
height: SizeConfig.screenHeight * .27, height: SizeConfig.screenHeight * .28,
padding: EdgeInsets.all(15), padding: EdgeInsets.all(15),
child: InkWell( child: InkWell(
child: Column( child: Column(
@ -466,8 +466,6 @@ class _AppDrawerState extends State<AppDrawer> {
Navigator.of(context).pushNamed(HOME); Navigator.of(context).pushNamed(HOME);
} }
login() async { login() async {
var data = await sharedPref.getObject(IMEI_USER_DATA); var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN); sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);
@ -498,7 +496,7 @@ class _AppDrawerState extends State<AppDrawer> {
.familyFileProvider .familyFileProvider
.silentLoggin(user is AuthenticatedUser ? null : user, .silentLoggin(user is AuthenticatedUser ? null : user,
mainUser: user is AuthenticatedUser) mainUser: user is AuthenticatedUser)
.then((value) async{ .then((value) async {
await authenticatedUserObject.getUser(); await authenticatedUserObject.getUser();
_vitalSignService.heightCm = ""; _vitalSignService.heightCm = "";
_vitalSignService.weightKg = ""; _vitalSignService.weightKg = "";

Loading…
Cancel
Save