-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#7513Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectp: google_sign_inThe Google Sign-In pluginThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team
Description
/Volumes/Work/s/w/ir/x/w/packages/packages/google_sign_in/google_sign_in_ios/darwin/Classes/FLTGoogleSignInPlugin.m:310:16: warning: nil passed to a callee that requires a non-null 2nd parameter [nullability.NullPassedToNonnull]
310 | completion([FSIUserData makeWithDisplayName:user.profile.name
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
311 | email:user.profile.email
| ~~~~~~~~~~~~~~~~~~~~~~~~
312 | userId:user.userID
| ~~~~~~~~~~~~~~~~~~
313 | photoUrl:[photoUrl absoluteString]
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
314 | serverAuthCode:serverAuthCode
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
315 | idToken:idToken],
| ~~~~~~~~~~~~~~~~
1 warning generated.
You can see this by running:
$ dart run script/tool/bin/flutter_plugin_tools.dart xcode-analyze "--ios-min-version=14.0" --ios args: ["xcode-analyze", "--ios", "--ios-min-version=14.0"]I don't think this is actually causing any bugs, but the pattern here is a little off: the GIDSignInResult should be checked for nil, then the error handled.
https://github.com/flutter/packages/blob/e11be1a82a60d418dd628f2dc1662a5c6690696a/packages/google_sign_in/google_sign_in_ios/darwin/Classes/FLTGoogleSignInPlugin.m#L155-L166
[self signInWithHint:nil
additionalScopes:self.requestedScopes.allObjects
completion:^(GIDSignInResult *_Nullable signInResult, NSError *_Nullable error) {
GIDGoogleUser *user;
NSString *serverAuthCode;
if (signInResult) {
user = signInResult.user;
serverAuthCode = signInResult.serverAuthCode;
}
[self didSignInForUser:user
withServerAuthCode:serverAuthCode
completion:completion
error:error];
}];Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectp: google_sign_inThe Google Sign-In pluginThe Google Sign-In pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform team