|
|
|
|
@ -215,23 +215,40 @@ class _SavedLogin extends State<SavedLogin> {
|
|
|
|
|
const SizedBox(height: 24),
|
|
|
|
|
// OTP login button
|
|
|
|
|
widget.savedLoginData.logInType != null && widget.savedLoginData.logInType != 1
|
|
|
|
|
? CustomButton(
|
|
|
|
|
text: TranslationBase.of(context).loginByOTP,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
if (widget.savedLoginData.logInType! == 2 || widget.savedLoginData.logInType! == 3) {
|
|
|
|
|
loginWithFingerPrintFace(widget.savedLoginData.logInType!, widget.savedLoginData.iMEI!);
|
|
|
|
|
} else {
|
|
|
|
|
widget.savedLoginData.logInType = 1;
|
|
|
|
|
int? val = widget.savedLoginData.logInType!;
|
|
|
|
|
checkUserAuthentication(val);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
borderColor: Color(0xFF2E3039),
|
|
|
|
|
textColor: Color(0xFF2E3039),
|
|
|
|
|
borderWidth: 2,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 14, 0, 14),
|
|
|
|
|
icon: "assets/images/svg/password-validation.svg",
|
|
|
|
|
? Column(
|
|
|
|
|
children: [
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: TranslationBase.of(context).loginByOTP,
|
|
|
|
|
onPressed: () {
|
|
|
|
|
widget.savedLoginData.logInType = 1;
|
|
|
|
|
int? val = widget.savedLoginData.logInType!;
|
|
|
|
|
checkUserAuthentication(val);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
borderColor: Color(0xFF2E3039),
|
|
|
|
|
textColor: Color(0xFF2E3039),
|
|
|
|
|
borderWidth: 2,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 14, 0, 14),
|
|
|
|
|
icon: "assets/images/svg/password-validation.svg",
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 20,
|
|
|
|
|
),
|
|
|
|
|
CustomButton(
|
|
|
|
|
text: "${TranslationBase.of(context).loginBy} ${getType(4, context)}",
|
|
|
|
|
onPressed: () {
|
|
|
|
|
widget.savedLoginData.logInType = 4;
|
|
|
|
|
int? val = widget.savedLoginData.logInType!;
|
|
|
|
|
checkUserAuthentication(val);
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
borderColor: Color(0xFF2E3039),
|
|
|
|
|
textColor: Color(0xFF2E3039),
|
|
|
|
|
borderWidth: 2,
|
|
|
|
|
padding: EdgeInsets.fromLTRB(0, 14, 0, 14),
|
|
|
|
|
icon: "assets/images/svg/whatsapp.svg",
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: CustomButton(
|
|
|
|
|
text: "${TranslationBase.of(context).loginBy} ${getType(4, context)}",
|
|
|
|
|
|