问题描述
我在Flutter中使用google calender API和google登录,但是当我尝试登录时,google希望每次都选择Gmail地址。
当我使用不带google calender API的google登录时,我的应用在首次登录后自动登录。然后,我添加了Google calender API,Google开始希望我每次都选择一个Gmail帐户。
如何为Google Api选择Google登录帐户?
有代码。
final GoogleSignIn googleSignIn = GoogleSignIn(
clientId:"THIS IS CLIENT ID"
scopes: [
'https://www.googleapis.com/auth/calendar',],);
clientViaUserConsent(ClientId(googleSignIn.clientId,''),[Calendarapi.CalendarScope],prompt)
.then((AuthClient client) {
Constants.baseCl = client;
});
void prompt(String url) async {
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)