login changes

merge-update-with-lab-changes
Sultan Khan 5 years ago
parent d1871bb71f
commit 6af7ac54ba

@ -29,7 +29,7 @@ class ConfirmLogin extends StatefulWidget {
class _ConfirmLogin extends State<ConfirmLogin> {
final LocalAuthentication auth = LocalAuthentication();
dynamic _availableBiometrics;
var _availableBiometrics;
var sharedPref = new AppSharedPreferences();
bool authenticated;
final authService = new AuthProvider();
@ -271,9 +271,10 @@ class _ConfirmLogin extends State<ConfirmLogin> {
if (type == 2 || type == 3) {
fingrePrintBefore = type;
}
this.selectedOption = user.logInType == 3 || user.logInType == 2
? user.logInType
: fingrePrintBefore != null ? fingrePrintBefore : type;
this.selectedOption =
(user != null && (user.logInType == 3 || user.logInType == 2))
? user.logInType
: fingrePrintBefore != null ? fingrePrintBefore : type;
switch (type) {
case 1:
@ -411,8 +412,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
setUser() async {
user = SelectDeviceIMEIRES.fromJson(
await sharedPref.getObject(IMEI_USER_DATA));
if (await sharedPref.getObject(IMEI_USER_DATA) != null)
user = SelectDeviceIMEIRES.fromJson(
await sharedPref.getObject(IMEI_USER_DATA));
}
setDefault() async {

Loading…
Cancel
Save