8/27/1
This commit is contained in:
@@ -86,18 +86,26 @@ class GoogleSignInHelper {
|
||||
static Future<GoogleSignInAccount?> signInFromLogin() async {
|
||||
try {
|
||||
final GoogleSignInAccount? googleUser = await _googleSignIn.signIn();
|
||||
|
||||
if (googleUser != null) {
|
||||
await _handleSignUp(googleUser);
|
||||
await Get.find<LoginDriverController>().loginUsingCredentials(
|
||||
box.read(BoxName.driverID).toString(),
|
||||
box.read(BoxName.emailDriver).toString(),
|
||||
);
|
||||
|
||||
// Add detailed debug print statements
|
||||
final driverID = box.read(BoxName.driverID)?.toString() ?? 'Unknown ID';
|
||||
final emailDriver =
|
||||
box.read(BoxName.emailDriver)?.toString() ?? 'Unknown Email';
|
||||
|
||||
// print('Driver ID: $driverID');
|
||||
// print('Email Driver: $emailDriver');
|
||||
|
||||
await Get.find<LoginDriverController>()
|
||||
.loginUsingCredentials(driverID, emailDriver);
|
||||
}
|
||||
|
||||
return googleUser;
|
||||
} catch (error) {
|
||||
Get.snackbar('Google Sign-In error', '$error',
|
||||
backgroundColor: AppColor.redColor);
|
||||
// Log error details
|
||||
print('Google Sign-In error: $error');
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user