腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
Flutter
Firestore
异步
函数
/
等待
结果
flutter
、
dart
、
asynchronous
、
async-await
allPosts.map((doc) => Post.fromDocument(doc)).toList(); groupPosts = posts; } I/
flutter
41e8-90b2-04781b2a2954, 3545784b-0fca-4d35-bd0d-5d877e58808f, 66036190-304f-4984-9e7a-1a9a92e83466]I/
flutter
(11768
浏览 11
提问于2021-03-30
得票数 0
1
回答
如何使用
异步
函数
异步
侦听
Firestore
中的值?
asynchronous
、
flutter
、
dart
、
google-cloud-firestore
、
future
我有一个
异步
的
Flutter
函数
,它与
Firestore
通信。有一个运行的服务器
函数
,我指示任务完成的标志是我使用StreamSubscription收听的标志。StreamSubscription侦听代码封装了一个未来
异步
函数
,但是我不知道如何从StreamSubscription的
函数
处理程序返回一个未来。> listenToProcess( StreamSubscripti
浏览 0
提问于2019-08-11
得票数 0
回答已采纳
1
回答
异步
等待
flutter
firestore
asynchronous
、
flutter
、
async-await
、
google-cloud-firestore
class Test { var myData; DocumentSnapshot snapshot = await _
firestore
.collection('Counter').document
浏览 1
提问于2019-10-19
得票数 0
1
回答
在颤动代码中
等待
完成
异步
本机请求
android
、
flutter
我正在开发一个
Flutter
应用程序,它需要从
Flutter
中调用原生代码(Android/Java)中的ActivityCompat.requestPermissions
函数
。API原生代码
函数
是
异步
的,即对requestPermissions的调用立即返回,requestPermissions调用的
结果
稍后由Android返回。我如何在
Flutter
中
等待
,当我通过methodChannel从
Flutter
调用接口req
浏览 1
提问于2021-03-23
得票数 0
2
回答
等待
表达式只能在
异步
函数
中使用。
asynchronous
、
flutter
、
dart
、
google-cloud-firestore
当用户登录时,我正在尝试从
Firestore
加载一些数据,并且需要等到数据加载后再继续。然而,我
等待
结果
的努力没有奏效。database =
Firestore
(); return false;} isDone = await loadUserData(firebaseUser)
浏览 0
提问于2020-02-10
得票数 5
回答已采纳
3
回答
迭代
Firestore
集合上的文档求和值的最佳方法是什么?
firebase
、
flutter
、
google-cloud-firestore
我正在尝试使用
Flutter
的"cloud_
firestore
“包,找出如何对
Firestore
colletion中每个文档上存储的值进行求和。我试过这段代码: total = 0.0; .collection('myCollectiondoc.data['amount']); debugPrint(this.total.toString()
浏览 3
提问于2018-10-10
得票数 2
回答已采纳
2
回答
为什么
异步
/
等待
然后产生不同的
结果
javascript
、
asynchronous
、
google-cloud-firestore
、
async-await
、
promise
下面两个代码在我看来非常相似,但是为什么两者给出了不同的
结果
。如何以.then的方式获得
异步
/
等待
.then
函数
的
结果
。谢谢。
异步
/
等待
let response; .collection(collection) .w
浏览 4
提问于2021-12-28
得票数 2
回答已采纳
1
回答
如何在map
函数
中
等待
我未来的
函数
?(颤动)
firebase
、
flutter
、
dart
、
google-cloud-firestore
所以,我在
Flutter
中构建我的应用程序,不幸的是,我最近遇到了一个错误。因此,我想在我的TestProvider类中做的是从
firestore
获取数据( getQuestionFromFirebase()
函数
正在做的事情),然后,我想从DocumentSnapshot (出现了一个错误,因为我无法在map
函数
中进行
异步
操作,所以我的
函数
不会
等待
上一个
函数
的
结果
,而是返回null。有什么解决方案吗?但是当我试图从TestReposi
浏览 0
提问于2020-12-08
得票数 3
1
回答
如何在
flutter
离线时向
firestore
集合中添加新字段?
mobile
、
flutter
、
google-cloud-firestore
我正在使用
flutter
和Google
firestore
,我需要更新一个集合(添加一个新字段),离线时,我使用飞机模式进行测试。当我点击按钮时,应用程序崩溃,数据不会发送到数据库。我认为这是因为
异步
/
等待
,然而,如果我不使用它们,应用程序在在线时甚至不会保存。小部件,其中是调用更新
函数
的
函数
(我使用的是FutureBuilder): var formataData = new DateFormat('y/MM/dd'); var dat
浏览 25
提问于2019-07-02
得票数 1
1
回答
带有
异步
的Stream<QuerySnapshot> getAllLists()
flutter
、
dart
、
google-cloud-firestore
value) => { // temp is now "prio" .orderBy(temp, descending: false) } 我需要
等待
getUserSortMethod()的
结果
才能使用它。我如何
浏览 1
提问于2022-12-02
得票数 0
1
回答
等待
在
异步
函数
外部使用
javascript
、
reactjs
、
firebase
、
asynchronous
、
google-cloud-firestore
我正在为一个项目开发react +
firestore
9,我一直在寻找一种检索数据以显示在我的应用程序上的方法。"; const result = await getDocs(query(collection(db, 'persons'))); 我的问题是关于
异步
函数
外部的
等待
,我总是得到相同的错误,我通过创建一个
异步
函数
来包装
等待
,如下所示: import firebase, { d
浏览 10
提问于2021-11-09
得票数 2
回答已采纳
1
回答
Flutter
等待
不使用
Firestore
QuerySnapShot
flutter
、
google-cloud-firestore
、
dart-async
、
flutter-future
我正在尝试获取用户的联系人,并在我的数据库(
Firestore
)中搜索每个联系人的电话号码。我成功地实现了获取联系人和查询每个号码的
firestore
,但是当我想
等待
get()时,查询的
结果
似乎并没有
等待
。我有一个FutureBuilder,它的未来属性是下面的
函数
: Future<List<User>> doItAll() async {I
浏览 31
提问于2021-08-31
得票数 0
回答已采纳
1
回答
异步
firestore
返回
函数
代码的更简单方法
javascript
、
jquery
、
asynchronous
、
google-cloud-firestore
我需要创建一些方法来从
Firestore
获取信息,并将这些数据作为变量返回。为了做到这一点,我知道
firestore
的get()方法,它是
异步
的,我需要
等待
end才能得到这个
结果
。.catch(function (error) { });为了执行这个
函数
AMBITS.AMBIT_ARTISTIC, 8); idcompetencia.then
浏览 16
提问于2020-07-31
得票数 0
回答已采纳
4
回答
flutter
/ dart如何检查文件是否存在于
firestore
中?
firebase
、
flutter
、
dart
、
google-cloud-firestore
getok() {
Firestore
.instance.document('collection/$name').get().then((onexist){ onexist.exists
浏览 96
提问于2019-09-11
得票数 5
回答已采纳
1
回答
如何使用
异步
/
等待
函数
?
reactjs
、
async-await
我有一个如下的
函数
: function getMessages(){ .collection('messageserr) ) } 在上面的
函数
中,我需要在this.renderMessages() function.For中使用this.listMessage数组,getMessa
浏览 8
提问于2020-04-19
得票数 0
2
回答
在删除项目时为用户添加标题
javascript
、
reactjs
export function DeleteButton({ item }) { const {
firestore
handleClose}>Cancel</Button>
浏览 4
提问于2022-10-09
得票数 4
回答已采纳
1
回答
如何在Firebase中使用承诺
javascript
、
firebase
、
google-cloud-firestore
、
async-await
、
promise
我试图使用一个键数组和一个map
函数
从
Firestore
读取一些数据,然后,当所有数据都从
Firestore
返回时,在
结果
数据集上运行一个
函数
。我试着
等待
,但是我收到了一条错误消息,上面写着"Uncaught语法错误:
等待
只在
异步
函数
和
异步
生成器中有效“。我认为下面显示的
等待
在
异步
函数
中,但显然不是。
浏览 2
提问于2021-03-28
得票数 0
1
回答
我试图将数据添加到防火墙中,但是,"
Firestore
组件不存在“。终端提供此错误消息。
dart
、
flutter
、
google-cloud-firestore
这是终端输出和createData
函数
。/cloud_
firestore
(18061):未能处理方法调用E/MethodChannel#plugins.
flutter
.io/cloud_
firestore
(18061):java.lang.NullPointerException(com.google.firebase:firebase-
firestore
@@18.2.0:88) E/MethodChannel#plugins.
flutter
.io
浏览 0
提问于2019-04-29
得票数 1
回答已采纳
2
回答
Flutter
等待
Firestore
完成
firebase
、
flutter
、
dart
、
google-cloud-firestore
我正在使用
flutter
和firebase来创建一个应用程序。下面的
函数
从我的firebase数据库中获取一些数据,但问题是获取数据花费的时间太长。如何确保应用程序
等待
firebase获取数据后再继续? 我想做一些像
等待
这样的事情,但我不知道我是否能做到: await
Firestore
.instance...代码: void getData() { .collection('collection')
浏览 24
提问于2020-03-21
得票数 1
回答已采纳
2
回答
异步
函数
正在返回未定义的
javascript
、
reactjs
、
firebase
、
promise
、
async-await
我真的需要温习一下我的
异步
等待
和承诺。我想要一些建议。 我正在对firebase
firestore
进行
异步
函数
调用。该
函数
应根据单个输入参数返回一个字符串。 该功能适用于1对1用户聊天。该
函数
用于创建聊天/查找现有聊天,并返回其ID。 现在,我将undefined作为openChat的返回值,但我不知道为什么。除了返回之外,该
函数
还可以正常工作。 我有两个
函数
。一个是React类组件生命周期方法,另一个是我的firebas
浏览 16
提问于2019-02-13
得票数 3
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
对象存储
实时音视频
云点播
活动推荐
运营活动
广告
关闭
领券