signInWithGoogle method
Implementation
Future<UserAuthInfo?> signInWithGoogle(TypeLogin typeLogin) async {
try {
final googleUser = await _googleSignIn.signIn();
if (googleUser != null) {
return UserAuthInfo(
id: googleUser.id,
typeLogin: typeLogin,
email: googleUser.email,
photoUrl: googleUser.photoUrl,
name: googleUser.displayName);
} else {
return null;
}
} catch (error) {
if (kDebugMode) {
print(error);
}
}
return null;
}