Skip to content

Commit f36957b

Browse files
Gemini review
1 parent 43a58b4 commit f36957b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/google_sign_in/google_sign_in_android/android/src/main/java/io/flutter/plugins/googlesignin/GoogleSignInPlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ public void revokeAccess(
460460
.addOnFailureListener(
461461
e ->
462462
ResultUtilsKt.completeWithUnitError(
463-
callback, new FlutterError("removeAccess failed", e.getMessage(), null)));
463+
callback, new FlutterError("revokeAccess failed", e.getMessage(), null)));
464464
}
465465

466466
@Override

packages/google_sign_in/google_sign_in_android/lib/google_sign_in_android.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,10 @@ class GoogleSignInAndroid extends GoogleSignInPlatform {
290290
// indirect way to get the associated email address that's not
291291
// deprecated.
292292
if (email != null) {
293-
_cachedAccounts[email] = result.grantedScopes.first;
293+
final String? scope = result.grantedScopes.firstOrNull;
294+
if (scope != null) {
295+
_cachedAccounts[email] = scope;
296+
}
294297
}
295298
return (
296299
accessToken: accessToken,

0 commit comments

Comments
 (0)