草庐IT

cloud-firestore

全部标签

firebase - Firestore 事务不起作用

我找到了someissuethread人们也无法完成交易,但它甚至不提供解决方案。问题突然间,我的transactionscrashes当使用transaction.get.runTransaction((Transactiontransaction)async{awaittransaction.get(documentReference);//"TimedoutwaitingforTask"}PlatformException也没有真正帮助我,因为它在platform_channel...中崩溃了E/flutter(16297):[ERROR:topaz/lib/tonic/logg

firebase - Flutter cloud_firestore 系统日期对象的设置/警告

在使用cloud_firestore访问CloudFirestore文档数据库的Flutter应用程序中,我在调试时在控制台中收到以下警告/错误...4.13.0-[Firebase/Firestore][I-FST000001]ThebehaviorforsystemDateobjectsstoredinFirestoreisgoingtochangeANDYOURAPPMAYBREAK.Tohidethiswarningandensureyourappdoesnotbreak,youneedtoaddthefollowingcodetoyourappbeforecallingany

firebase - 在 Flutter 应用程序上过滤和排序 Firebase (Firestore) 数据

如果我的用户数据库在Firestore上并且在注册时,我会问每个用户几个问题(复选框、单选按钮等)。我想创建一个过滤和排序机制,用户可以根据根据特定字段排序的多个过滤参数过滤和排序其他用户列表(来自Firestore)。我想在Firebase(FireStore)和Flutter上创建什至可能,还是我需要其他任何东西?任何人都可以将我链接到任何相关的Flutter/Firebase文档、YouTube视频或任何其他相关内容。 最佳答案 从Firestore获取用户列表后,您可以使用Flutter中List类提供的方法轻松地对它们进行

dart - Flutter:在第一次加载时将数据预加载到 Firestore 本地缓存中

我在Flutter应用中实现了CloudFirestore,但遇到了这个问题:如果在第一次加载应用时(安装后)没有网络连接,则不会显示任何数据。我的问题是:如何让Firestore中的数据在第一次加载(安装后)时显示,即使没有互联网连接?我获取数据的代码是这样的:classQuestionsListStateextendsState{@overrideWidgetbuild(BuildContextcontext){returnnewStreamBuilder(stream:_questionsCollectionReference.where("category",isEqualTo

firebase - Flutter cloud_firestore 插件 Android 上的事务

有没有人使用cloud_firestore插件成功运行过交易?我收到以下错误:E/AndroidRuntime(26208):FATALEXCEPTION:AsyncTask#2E/AndroidRuntime(26208):Process:io.flutter.plugins.googlesigninexample,PID:26208E/AndroidRuntime(26208):java.lang.RuntimeException:Anerroroccurredwhile>executingdoInBackground()E/AndroidRuntime(26208):atandr

dart - 如何使用 Flutter 监听 Cloud Firestore 中的文档更改?

我想要一个监听器方法,如果发生更改,它会检查对文档集合的更改。类似:import'package:cloud_firestore/cloud_firestore.dart';FuturecheckFocChanges()async{Firestore.instance.runTransaction((Transactiontx)async{CollectionReferencereference=Firestore.instance.collection('planets');reference.onSnapshot.listen((querySnapshot){querySnapsh

如果不创建则 Flutter Firestore 更新(如果存在)

我想知道特定文档是否存在,更新该文档,如果不存在,是否可以在Firestore中创建该文档。例如,用户输入了一些带有帖子的标签,然后看起来像这样Firestore.instance.collection('tags').document(taghere).updateData()。如果该文档不存在,有什么办法,然后创建方法还是我必须在编写之前检查它是否存在? 最佳答案 更新在较新的FirebaseSDK上,语法发生了变化;Firebase是FirebaseFirestore,不推荐使用setData以支持set+SetOptions

firebase - 为什么我在 Firebase Cloud Functions 中收到 "Invalid Envelope"错误?

关闭。这个问题需要detailsorclarity.它目前不接受答案。想要改进这个问题吗?通过editingthispost添加详细信息并澄清问题.关闭2年前。Improvethisquestion有时可调用CloudFunctions的响应cloud_functions0.0.5抛出CloudFunctionGenericException带有“无效信封”消息。这似乎没有特定原因发生,并且没有任何内容记录到Firebase云函数日志中。这种情况很少发生(大约每10次),但破坏了应用逻辑。为什么会发生这种情况以及如何解决? 最佳答案

dart - 如何在 flutter 图像选择器中将图像添加到 Firestore

我想将照片添加到Firestore。你能告诉我怎么做吗?我正在使用图像选择器在我的Flutter应用中选择照片。我的代码在下面import'package:flutter/material.dart';import'package:onlinecity/component/TextField/inputField.dart';import'package:onlinecity/component/Button/roundedButton.dart';import'package:onlinecity/component/Button/textButton.dart';import'st

firebase - Flutter 中的 cloud_firestore 和 firebase_auth 兼容性问题

我正在开发一个Flutter应用。当我单独使用cloud_firestore和firebase_auth包时,我的应用程序可以正常工作。但是,当我将它们一起包含在pubspecs.yaml文件中时,构建失败并显示以下消息:Note:/home/saber/Code/mobile_dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.7.4/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.j