7/5/1
This commit is contained in:
@@ -57,9 +57,10 @@ class LoginDriverController extends GetxController {
|
||||
'email': email,
|
||||
'id': driverID,
|
||||
});
|
||||
print(res);
|
||||
if (res == 'Failure') {
|
||||
//Failure
|
||||
if (box.read(BoxName.phoneVerified) == '1') {
|
||||
if (box.read(BoxName.phoneVerified).toString() == '1') {
|
||||
Get.offAll(() => EgyptCardAI());
|
||||
} else {
|
||||
Get.offAll(() => SmsSignupEgypt());
|
||||
@@ -72,7 +73,7 @@ class LoginDriverController extends GetxController {
|
||||
var jsonDecoeded = jsonDecode(res);
|
||||
if (jsonDecoeded.isNotEmpty) {
|
||||
if (jsonDecoeded['status'] == 'success' &&
|
||||
jsonDecoeded['data'][0]['is_verified'] == 1) {
|
||||
jsonDecoeded['data'][0]['is_verified'].toString() == '1') {
|
||||
box.write(BoxName.emailDriver, jsonDecoeded['data'][0]['email']);
|
||||
box.write(BoxName.gender, jsonDecoeded['data'][0]['gender']);
|
||||
box.write(BoxName.phoneVerified,
|
||||
|
||||
@@ -109,13 +109,17 @@ class RegisterCaptainController extends GetxController {
|
||||
if (res != 'failure') {
|
||||
// var dec = jsonDecode(res);
|
||||
box.write(BoxName.phoneDriver, '+2${phoneController.text}');
|
||||
box.write(BoxName.phoneVerified, 1);
|
||||
box.write(BoxName.phoneVerified, '1');
|
||||
|
||||
// var res1 = await CRUD().post(
|
||||
// link: AppLink.updateAccountBank,
|
||||
// payload: {'phone': '+2${phoneController.text}'});
|
||||
// if (res1 != 'failure') {
|
||||
Get.to(EgyptCardAI());
|
||||
await Get.put(LoginDriverController()).loginUsingCredentials(
|
||||
box.read(BoxName.driverID).toString(),
|
||||
box.read(BoxName.emailDriver).toString(),
|
||||
);
|
||||
// Get.to(EgyptCardAI());
|
||||
// } else {
|
||||
// Get.snackbar('title', 'message');
|
||||
// }
|
||||
|
||||
@@ -98,7 +98,10 @@ class GoogleSignInHelper {
|
||||
box.write(BoxName.emailDriver, user.email);
|
||||
// box.write(BoxName.nameDriver, user.displayName);
|
||||
// box.write(BoxName.driverPhotoUrl, user.photoUrl);
|
||||
|
||||
print(box.read(BoxName.driverID).toString());
|
||||
print(
|
||||
box.read(BoxName.emailDriver).toString(),
|
||||
);
|
||||
// Perform any additional sign-up tasks or API calls here
|
||||
// For example, you can send the user data to your server for registration
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user