Firebase Flutter 登录出现错误
04-28 14:31:21.261 7687-8012/com.companyname.firebaselogin I/flutter:'package:google_sign_in/google_sign_in.dart':断言失败:第 38 行:'displayName != null':不正确。
使用与记录的代码相同的 -
Future<FirebaseUser> _handleSignIn() async {
final GoogleSignIn _googleSignIn = new GoogleSignIn();
GoogleSignInAccount googleUser = await _googleSignIn.signIn();
GoogleSignInAuthentication googleAuth = await googleUser.authentication;
FirebaseUser user = await _auth.signInWithGoogle(
accessToken: googleAuth.accessToken,
idToken: googleAuth.idToken,
);
print("signed in " + user.displayName);
return user;
}
firebase_auth: "^0.5.5"
google_sign_in: "^3.0.2"