Future<void> signUpWithGoogle() async {
try{
final GoogleSignInAccount googleuser= await _google.signIn();
final GoogleSignInAuthentication googleAuth = await googleuser.authentication;
final AuthCredential credential = GoogleAuthProvider.getCredential(idToken: googleAuth.idToken, accessToken: googleAuth.accessToken);
final FirebaseUser user = (await _auth.signInWithCredential(credential)).user;
print("signed in " + user.displayName);
}catch(e) {
print(e);
}
}
我已经完成了此功能,首先使用Google扑朔迷离地登录此代码,但现在它不起作用并给出错误
I / flutter(29418):MissingPluginException(在渠道plugins.flutter.io/google_sign_in上未找到方法初始化的实现
我还完成了flutter clean的操作,并重建了apk出口并重新打开编辑器,但是我面临着同样的问题。