This commit is contained in:
Hamza-Ayed
2024-12-01 10:17:23 +02:00
parent 5aeb3cf685
commit 0129162309
34 changed files with 1317 additions and 875 deletions

View File

@@ -269,12 +269,8 @@ class RegisterCaptainController extends GetxController {
update();
}
// Show error message in case of invalid phone number
void _showErrorMessage(String message) {
mySnackeBarError(message);
}
verifySMSCode() async {
// var loginDriverController = Get.put(LoginDriverController());
if (formKey3.currentState!.validate()) {
var res = await CRUD().post(link: AppLink.verifyOtpDriver, payload: {
'phone_number': '+2${phoneController.text}',
@@ -285,24 +281,16 @@ class RegisterCaptainController extends GetxController {
box.write(BoxName.phoneDriver, '+2${phoneController.text}');
box.write(BoxName.phoneVerified, '1');
// var res1 = await CRUD().post(
// link: AppLink.updateAccountBank,
// payload: {'phone': '+2${phoneController.text}'});
// if (res1 != 'failure') {
Get.find<LoginDriverController>().isGoogleLogin == true
? await Get.put(LoginDriverController())
.loginUsingCredentialsWithoutGoogle(
Get.find<LoginDriverController>()
.passwordController
.text
.toString(),
box.read(BoxName.emailDriver).toString(),
)
: await Get.put(LoginDriverController()).loginUsingCredentials(
box.read(BoxName.driverID).toString(),
box.read(BoxName.emailDriver).toString(),
);
// Get.to(EgyptCardAI());
// loginDriverController.isGoogleLogin == true
// ? await loginDriverController.loginUsingCredentialsWithoutGoogle(
// loginDriverController.passwordController.text.toString(),
// box.read(BoxName.emailDriver).toString(),
// )
// : await loginDriverController.loginUsingCredentials(
// box.read(BoxName.driverID).toString(),
// box.read(BoxName.emailDriver).toString(),
// );
Get.to(EgyptCardAI());
// } else {
// Get.snackbar('title', 'message');
// }