我在Firebase上使用Flutter 翼.当我try 使用邮箱和密码注销时,它工作得很好,但当我try 使用谷歌时,它不起作用.
以下是我的代码: 说
try {
switch (user.providerData[0].providerId) {
case 'password':
await FirebaseAuth.instance.signOut();
break;
case 'google.com':
final GoogleSignIn googleSignIn = GoogleSignIn();
await googleSignIn.signOut();
break;
}
} on FirebaseAuthException catch (e) {
showAuthException(e, context);
}
说
我在试这个
说
try {
switch (user.providerData[0].providerId) {
case 'password':
await FirebaseAuth.instance.signOut();
break;
case 'google.com':
final GoogleSignIn googleSignIn = GoogleSignIn();
await googleSignIn.signOut();
break;
}
} on FirebaseAuthException catch (e) {
showAuthException(e, context);
}
说