otp changes done
This commit is contained in:
parent
f76195ce8c
commit
af081f73b3
@ -248,14 +248,14 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
|
|||||||
final message = data['data']['message'];
|
final message = data['data']['message'];
|
||||||
|
|
||||||
if (verification == true) {
|
if (verification == true) {
|
||||||
if (switcherStatus == 1) {
|
// if (switcherStatus == 1) {
|
||||||
_verifyPhoneNumber();
|
// _verifyPhoneNumber();
|
||||||
} else {
|
// } else {
|
||||||
setState(() {
|
setState(() {
|
||||||
enteredEmailOrMobile = true;
|
enteredEmailOrMobile = true;
|
||||||
});
|
});
|
||||||
ToastHelper.showSuccessToast(context, 'OTP sent successfully');
|
ToastHelper.showSuccessToast(context, 'OTP sent successfully');
|
||||||
}
|
// }
|
||||||
return true; // ✅ success
|
return true; // ✅ success
|
||||||
} else {
|
} else {
|
||||||
ToastHelper.showErrorToast(context, message);
|
ToastHelper.showErrorToast(context, message);
|
||||||
@ -284,7 +284,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
|
|||||||
// Build payload depending on switcher status
|
// Build payload depending on switcher status
|
||||||
final Map<String, dynamic> payload = (switcherStatus == 1)
|
final Map<String, dynamic> payload = (switcherStatus == 1)
|
||||||
? {
|
? {
|
||||||
'otp_verification': otpVerifyStatus,
|
'otp': otpVerifyStatus,
|
||||||
'mobile': _PhoneNumberController.text.trim(),
|
'mobile': _PhoneNumberController.text.trim(),
|
||||||
}
|
}
|
||||||
: {'otp': otpVerifyStatus, 'email': _emailController.text.trim()};
|
: {'otp': otpVerifyStatus, 'email': _emailController.text.trim()};
|
||||||
@ -1305,13 +1305,13 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
|
|||||||
text: "Continue",
|
text: "Continue",
|
||||||
backgroundColor: Color(0xFF436462),
|
backgroundColor: Color(0xFF436462),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (switcherStatus == 1) {
|
// if (switcherStatus == 1) {
|
||||||
await verifyFirebaseMobileOTP();
|
// await verifyFirebaseMobileOTP();
|
||||||
} else {
|
// } else {
|
||||||
await verifyMobileOrMailOTP(
|
await verifyMobileOrMailOTP(
|
||||||
_otpController.text,
|
_otpController.text,
|
||||||
);
|
);
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
// ElevatedButton(
|
// ElevatedButton(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user