草庐IT

cloud-firestore

全部标签

android - 无法发送到 Cloud Firestore

我正在尝试在我的flutter项目中使用firebasecloudfirestore我想通过这种方式发送用户名finalDocumentReferencereference=Firestore.instance.collection('users').document('info');@overridevoidinitState(){reference.setData({'name':widget.username});super.initState();}但我总是遇到这个问题是因为我忘记了什么还是我的代码是正确的?运行窗口:[ERROR:flutter/shell/common/sh

firebase - 可以从 Firestore 快照 Flutter 获取元数据吗?

我需要获取快照元数据,以便检查写入Firestore是否成功。我看source并看到有SnapshotMetadata和bool值hasPendingWrites()。但我找不到如何实现。没有开源dart项目使用过它。Firebasedocsay可以使用:.onSnapshot/.addSnapshotListener来指定includeMetadataChanges:true。但我需要确保在查询QuerySnapshot时获得元数据。我对stream使用query而不是addSnapshotListener。像这样:child:newFirestoreAnimatedList(que

firebase - 可以从 Firestore 快照 Flutter 获取元数据吗?

我需要获取快照元数据,以便检查写入Firestore是否成功。我看source并看到有SnapshotMetadata和bool值hasPendingWrites()。但我找不到如何实现。没有开源dart项目使用过它。Firebasedocsay可以使用:.onSnapshot/.addSnapshotListener来指定includeMetadataChanges:true。但我需要确保在查询QuerySnapshot时获得元数据。我对stream使用query而不是addSnapshotListener。像这样:child:newFirestoreAnimatedList(que

android - flutter : how i get data from firestore in List<String>?

大家好,我正在尝试从我的firestore数据库中获取数据到List为此,我创建变量ListlistCour;我使用该指令从firestore获取数据Firestore.instance.collection('MATH').document(doc.documentID).collection("cours").snapshots().listen((cour)=>cour.documents.forEach((doc){listCour.add(doc.documentID);}));但是列表没有数据!! 最佳答案 尝试使用do

android - flutter : how i get data from firestore in List<String>?

大家好,我正在尝试从我的firestore数据库中获取数据到List为此,我创建变量ListlistCour;我使用该指令从firestore获取数据Firestore.instance.collection('MATH').document(doc.documentID).collection("cours").snapshots().listen((cour)=>cour.documents.forEach((doc){listCour.add(doc.documentID);}));但是列表没有数据!! 最佳答案 尝试使用do

flutter - 我需要知道数据是否已添加到 Cloud Firestore (Flutter)

我有这个操作EventModeldata=EventModel(_nameEvent,_passEvent,_localEvent,_dateEventString);HashMapmapData=data.getEventMap();Firestore.instance.collection("app").document("database_v1").collection("events").document().setData(mapData);如果数据输入成功或不成功,我需要显示警告_scaffoldKey.currentState.showSnackBar(SnackBar(

flutter - 我需要知道数据是否已添加到 Cloud Firestore (Flutter)

我有这个操作EventModeldata=EventModel(_nameEvent,_passEvent,_localEvent,_dateEventString);HashMapmapData=data.getEventMap();Firestore.instance.collection("app").document("database_v1").collection("events").document().setData(mapData);如果数据输入成功或不成功,我需要显示警告_scaffoldKey.currentState.showSnackBar(SnackBar(

android - 在 Firestore 中阅读用户未阅读的信件

我的应用程序有一个名为:Letters的集合这些卡片由用户阅读。我需要创建一个查询,仅引用一封未被经过身份验证的用户阅读的信件。已经尝试过:letters  users         uid:true         uid:true         uid:false它可以工作,但是我必须为所有创建的字母和用户的每个创建创建引用“用户”,不包括映射中的最大字段数为20。我想过:letters/${userId}.read但是,我总是必须为每封给用户的信件创建引用。从卡片集合中获取一张未被该UID读取过的卡片 最佳答案 如果您向每

android - 在 Firestore 中阅读用户未阅读的信件

我的应用程序有一个名为:Letters的集合这些卡片由用户阅读。我需要创建一个查询,仅引用一封未被经过身份验证的用户阅读的信件。已经尝试过:letters  users         uid:true         uid:true         uid:false它可以工作,但是我必须为所有创建的字母和用户的每个创建创建引用“用户”,不包括映射中的最大字段数为20。我想过:letters/${userId}.read但是,我总是必须为每封给用户的信件创建引用。从卡片集合中获取一张未被该UID读取过的卡片 最佳答案 如果您向每

firebase - Flutter + Firebase Cloud Functions - 如何从 HttpsCallableResult 获取数据

我编写了一个简单的云函数,它返回一个保存在我的CloudFirestore数据库中的ID。云函数如下所示:exports.getWinkert=functions.https.onCall((data,context)=>{returnadmin.firestore().collection('users').doc('hash').get().then(snapshot=>{constwinkertId=snapshot.wwinkertreturn{id:winkertId};})})此函数是使用以下代码从我的flutter应用中调用的:Future_getValues()asyn