问题标签 [googlesigninaccount]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
google-fit - 从 GoogleSignInAccount 读取用户名(Google Fit Android API)
我正在使用 Google Fit Android API 来检索健身数据,这一切都像一个魅力。我还想访问当前登录用户的名称,GoogleSignInAccount .getDisplayName() 应该可以访问该名称;
我已经问过这个问题,但不幸的是没有得到任何答复,我无法通过文档弄清楚。
示例代码:
问题是 acct.getDisplayname().getGrantedScopes 就像一个魅力,我看到了授予的范围。当我尝试阅读 .getDisplayName 时,我总是得到 NULL。
flutter - Google 登录错误:输入“未来”' 不是“GoogleSignInAccount”类型的子类型?在类型转换中
使用 FirebaseAuth 我正在尝试将 google 帐户注册到我的应用程序。
在我的主屏幕上,我单击 TextButton 导航到ConnectionPage,在初始使用时,它会将我转移到SignUpWidget,单击以使用 google 登录,它会弹出允许我选择我的 google 用户的 POPUP 窗口,此时应该被路由到LoggedInWidget但是什么也没有发生(即快照没有数据)并且我不断收到带有错误日志“I/flutter(721):类型'Future< GoogleSignInAccount?>'的SignUpWidget不是'GoogleSignInAccount'类型的子类型?” 在类型转换中"
GoogleSignInProvider 中某处存在转换错误,我无法解决。有什么帮助吗?
谢谢你。
==== 相关依赖 ====
代码片段
==== 谷歌登录提供商 ====
==== 连接页面 ====
==== 注册小工具 ====
==== LoggedInWidget ====
flutter - Flutter:GoogleSignInAccount 属性“authentication”无法无条件访问,因为接收者可以为“null”
我是新来的颤振。正在练习 google 帐户登录。当我定义 GoogleSignInAccount 时,出现错误:“A value of type 'GoogleSignInAccount?' 不能分配给“GoogleSignInAccount”类型的变量。”
其他人说我们可以使用“?” 来解决这个问题。有用。但是,弹出另一个问题:“属性'authentication'不能无条件访问,因为receiver可以是'null'。”
任何建议都会很棒。泰