草庐IT

firebase-common

全部标签

firebase - 如何让Flutter注册更多的字段?

我的注册页面有以下字段名称、密码、确认密码和电子邮件,但flutterfirebase似乎只适用于电子邮件和密码。如何让更多字段在以下代码中工作:createUser()async{if(checkFields()){awaitFirebaseAuth.instance.createUserWithEmailAndPassword(email:_email,password:_password).then((user){print('signedinas${user.uid}');Navigator.push(context,MaterialPageRoute(builder:(con

firebase - Firestore 为 noSQL 和 Flutter 复制 SQL Join

我意识到在使用NoSql文档数据库(例如FireStore)复制连接方面存在很多问题,但是我无法找到将Dart/Flutter与FireStore结合使用的彻底解决方案。我做了一些研究,我觉得在下面的例子中我会寻找一个“多对多”的关系(如果这是错误的,请纠正我)因为将来可能还需要查看所有配置文件作为所有连接。在firebase中,我有两个根级集合(配置文件和连接):profile>documentKey(AutoGenerated)>name="JohnSmith">uid="xyc4567">documentKey(AutoGenerated)>name="JaneDoe">uid=

firebase - Firestore 为 noSQL 和 Flutter 复制 SQL Join

我意识到在使用NoSql文档数据库(例如FireStore)复制连接方面存在很多问题,但是我无法找到将Dart/Flutter与FireStore结合使用的彻底解决方案。我做了一些研究,我觉得在下面的例子中我会寻找一个“多对多”的关系(如果这是错误的,请纠正我)因为将来可能还需要查看所有配置文件作为所有连接。在firebase中,我有两个根级集合(配置文件和连接):profile>documentKey(AutoGenerated)>name="JohnSmith">uid="xyc4567">documentKey(AutoGenerated)>name="JaneDoe">uid=

firebase - Flutter - 异步函数返回 null

我已经断断续续地研究了几天,即使在搜索和挖掘之后,也没有弄明白。下面是两段相关的代码:FuturesignUp(Stringemail,Stringpassword,Stringusername)async{FirebaseUseruser=await_firebaseAuth.createUserWithEmailAndPassword(email:email,password:password).then((newUser){varobj={"active":true,"public":true,"email":email,"username":username};_profile

firebase - Flutter - 异步函数返回 null

我已经断断续续地研究了几天,即使在搜索和挖掘之后,也没有弄明白。下面是两段相关的代码:FuturesignUp(Stringemail,Stringpassword,Stringusername)async{FirebaseUseruser=await_firebaseAuth.createUserWithEmailAndPassword(email:email,password:password).then((newUser){varobj={"active":true,"public":true,"email":email,"username":username};_profile

firebase - Firestore : Getting a subcollection from a DocumentSnapshot

我正在使用Firestore作为Flutter项目的后端,数据库嵌套在文档下有子集合。结构如下:我有从Root集合中找到的数据,我试图从那里获取子集合,但我不知道如何获取。应该有可用的get()方法,但我没有得到。函数代码如下:void_getNext(DocumentSnapshotdoc)async{intv=doc.data.length;Stringid=doc.documentID;print('length=$v\tid=$id');awaitdoc.reference.get().then((val){val.data.forEach((k,v){print('k=$k&

firebase - Firestore : Getting a subcollection from a DocumentSnapshot

我正在使用Firestore作为Flutter项目的后端,数据库嵌套在文档下有子集合。结构如下:我有从Root集合中找到的数据,我试图从那里获取子集合,但我不知道如何获取。应该有可用的get()方法,但我没有得到。函数代码如下:void_getNext(DocumentSnapshotdoc)async{intv=doc.data.length;Stringid=doc.documentID;print('length=$v\tid=$id');awaitdoc.reference.get().then((val){val.data.forEach((k,v){print('k=$k&

firebase - 当您知道字段值时删除 firebase 中的文档

上下文:在前端,用户可以输入删除日期以了解可用性。这是我添加日期的方式:Firestore.instance.collection('availableDates').add({'availableDates':date});但我还需要从Firestore中的collection中删除一个document。我不知道documentid,但我知道字段value是唯一的。如果我知道文档中的字段值,我将如何删除文档。这是firestore的屏幕截图: 最佳答案 您可以先获取文档,然后再删除文档。例如:varcollection=Fireb

firebase - 当您知道字段值时删除 firebase 中的文档

上下文:在前端,用户可以输入删除日期以了解可用性。这是我添加日期的方式:Firestore.instance.collection('availableDates').add({'availableDates':date});但我还需要从Firestore中的collection中删除一个document。我不知道documentid,但我知道字段value是唯一的。如果我知道文档中的字段值,我将如何删除文档。这是firestore的屏幕截图: 最佳答案 您可以先获取文档,然后再删除文档。例如:varcollection=Fireb

firebase-realtime-database - Flutter Firebase 数据库错误的时间戳顺序

我正在尝试将时间戳设置到firebase实时数据库中,但是当我检索时,不是按时间戳排序。我确实喜欢。FirebaseDatabase.instance.reference().child('path').push().set({'timestamp':ServerValue.timestamp});这是节点然后我像这样检索。FirebaseDatabase.instance.reference().child('path').orderByChild('timestamp').once().then((snap){print(snap.value);});但是输出是这样的{-LJhyf