Flutter,Google API每次都希望选择gmail地址

问题描述

我在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 (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...