我正在使用Firestore存储我的flutter应用程序的数据,并且我创建了一个函数,该功能可在用户登录My Firestore数据库后自动在firestore中创建文档
现在,我希望用户在填写此表单时将数据添加到用户电子邮件所在的同一文档中。
[ RaisedButton(
child: Text("Submit"),
onPressed: () {
final CollectionReference users = Firestore.instance.collection('users');
Firestore.instance
.runTransaction((Transaction transaction) async {
CollectionReference reference =
Firestore.instance.collection('users');
await reference
.add({"fullname": nameController.text, "PhoneNumber": phoneController.text, "adresse": adressController.text});
nameController.clear();
phoneController.clear();
adressController.clear();
});},][2]
Run Code Online (Sandbox Code Playgroud)
我尝试了此代码,但它添加了新文档。
dart firebase firebase-authentication flutter google-cloud-firestore
我正在使用Firebase身份验证在我的Flutter应用程序中对用户进行身份验证,当用户输入正确的密码时,该应用程序会正常向他显示主页,但是当密码输入错误时没有任何反应,我想在每次用户输入了错误的密码,该怎么办?